In K-city, there are n streets running east-west, and m streets running north-south. Each street running east-west and each street running north-south cross each other. We will call the smallest area that is surrounded by four streets a block. How many blocks there are in K-city?

-----Constraints-----
 - 2 ≤ n, m ≤ 100

-----Input-----
Input is given from Standard Input in the following format:
n m

-----Output-----
Print the number of blocks in K-city.

-----Sample Input-----
3 4

-----Sample Output-----
6

There are six blocks, as shown below:

Difficulty: introductory

Starter code:

Solutions:
a, b = map(int, input().split())
print((a - 1) * (b - 1))

n,m = map(int,input().split())

print((n-1)*(m-1))

m, n = map(int, input().split())
print((m - 1) * (n - 1))

a,b = map(int,input().split())
print((a-1)*(b-1))

x,y=map(int,input().split())

print((x-1)*(y-1))

n, m = list(map(int, input().split()))
print(((n-1)*(m-1)))


n,m=map(int,input().split())
print((n-1)*(m-1))

#
# abc069 a
#
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """3 4"""
        output = """6"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """2 2"""
        output = """1"""
        self.assertIO(input, output)


def resolve():
    n, m = list(map(int, input().split()))
    print(((n-1)*(m-1)))


def __starting_point():
    # unittest.main()
    resolve()

__starting_point()

nums = list(map(int, input().split()))
print((nums[0] - 1) * (nums[1] - 1))

n, m = map(int, input().split())
print((n-1) * (m-1))

n,m = map(int,input().split())
print((n-1)*(m-1))

N,M=map(int,input().split())
print((N-1)*(M-1))

n, m = list(map(int, input().split()))
print(((n - 1) * (m - 1)))


a,b=map(int,input().split())
print((a-1)*(b-1))

n,m = map(int,input().split())
print((n - 1)*(m - 1))

n, m = map(int, input().split())
print((n-1)*(m-1))

n, m = map(int, input().split())
ans = (n-1)*(m-1)
print(ans)

n,m = map(int,input().split())
  
print((n-1)*(m-1))  

a,b=map(int,input().split())
print((a-1)*(b-1))

n,m=map(int,input().split())
print((n-1)*(m-1))

n, m = map(int,input().split())

print((n - 1) * (m - 1))

a,b=map(int,input().split())
print((a-1)*(b-1))

a,b = map(int,input().split())
print((a-1)*(b-1))

n,m = list(map(int, input().split()))
print(( (n-1)*(m-1) ))


n,m = map(int,input().split())
print((n-1)*(m-1))

n,m=map(int,input().split())
print((n-1)*(m-1))

n, m = map(int, input().split())
ans = (n - 1) * (m - 1)

print(ans)

n, m = map(int, input().split())
print(~-n * ~-m)

a,b = map(int, input().split())
print((a-1)*(b-1))

n, m = map(int,input().split())
print((n-1)*(m-1))

n,m = map(int,input().split())

print((n+1)*(m+1)-2*(n+1)-(m+1-2)*2)

n,m = map(int,input().split())
print((n-1)*(m-1))

n,m=map(int,input().split())
print((n-1)*(m-1))

a,b=map(int,input().split(" "))
print((a-1)*(b-1))

n,m=map(int, input().split())   
print((n-1)*(m-1))

n,m=map(int,input().split())
print((n-1)*(m-1))

n, m = map(int, input().split())
print((n-1)*(m-1))

a,b=list(map(int,input().split()))
print(((a-1)*(b-1)))


n, m = map(int, input().split())
print((n-1)*(m-1))

n,m = map(int, input().split())
print((n-1)*(m-1))

a, b = map(int, input().split())
a -= 1
b -= 1
print(a * b)

n, m = map(int, input().split())
print((n - 1) * (m - 1))

N,M=list(map(int,input().split()))
print(((N-1)*(M-1)))


n,m = map(int,input().split())
print((n-1)*(m-1))

N, M = map(int, input().split())
print((N-1)*(M-1))

x,y=map(int,input().split())
print((x-1)*(y-1))

n,m=map(int,input().split())
print((n-1)*(m-1))

a, b = map(int, input().split())

print((a - 1) * (b - 1))

n, m = map(int, input().split())
print((n - 1) * (m - 1))

n, m = list(map(int,input().split(" ")))
print(((n - 1) * (m - 1)))


n, m = map(int, input().split())
print((n-1)*(m-1))

n, m = map(int, input().split())

print((n-1) * (m-1))

a,b=map(int,input().split())
print((a-1)*(b-1))

a, b = map(int, input().split())
a = a-1
b = b-1
print(a*b)

a, b = map(int, input().split())
print((a-1) * (b-1))

n,m=map(int,input().split())
print((n-1)*(m-1))

n, m = list(map(int, input().split()))
print(((n - 1) * (m - 1)))


a,b=map(int,input().split())
print((a-1)*(b-1))

n,m = map(int,input().split())
print((n-1)*(m-1))

a, b = map(int, input().split())
print((a-1) * (b-1))

n,m = map(int,input().split())
print((n-1)*(m-1))

n,m =map(int,input().split())
print((n-1)*(m-1))

N, M = map(int, input().split())
print((N-1)*(M-1))

#n = int(input())
n,m = map(int,input().split())
#l = list(map(int,input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
print((m-1)*(n-1))

m,n = map(int,input().split())
print((m-1)*(n-1))

n, m= map(int, input().split())
print((n-1)*(m-1))

n,m = list(map(int,input().split()))
print(((n-1)*(m-1)))


a = input().split()
b,c =  int(a[0]),int(a[1])
print((b-1)*(c-1))

a, b = input().split()

print((int(a) - 1) * (int(b) - 1))

n,m=map(int,input().split())
print((n-1)*(m-1))

W, H = map(int, input().split())
print((W-1)*(H-1))

N,M=map(int,input().split())
print((N-1)*(M-1))

n,m=map(int,input().split())
print((n-1)*(m-1))

n,m=map(int,input().split());print((n-1)*(m-1))

n,m=map(int,input().split())
print((n-1)*(m-1))

n, m = list(map(int, input().split()))

print(((n - 1) * (m - 1)))


n, m = list(map(int, input().split()))
print(((n - 1) * (m - 1)))


def iroha():
    a, b = list(map(int, input().split()))
    print(((a-1)*(b-1)))

def __starting_point():
    iroha()


__starting_point()

n, m = map(int, input().split())

area = (n - 1) * (m - 1)
print(area)

a,b = map(int, input().split())
print((a-1)*(b-1))

a,b = map(int,input().split())
print((a-1) * (b-1))

a,b=input().split()
a=int(a)
b=int(b)
print((a-1)*(b-1))

a,b=map(int,input().split())
print((a-1)*(b-1))

n,m = [int(x) for x in input().split()]
print((n-1)*(m-1))

a,b = map(int,input().split())
print((a-1) * (b-1))

a,b=map(int,input().split())
print((a-1)*(b-1))

#!/usr/bin/env python3

def main():
    n, m = list(map(int, input().split()))
    print(((n - 1) * (m - 1)))


def __starting_point():
    main()

__starting_point()

n, m = list(map(int, input().split()))
print(((n-1)*(m-1)))


n, m = map(int, input().split())

if n == 1 or m == 1:
    print(0)
else:
    print((n - 1) * (m - 1))

lst = input().split()
print((int(lst[0]) - 1) * (int(lst[1]) - 1))

x,y =map(int,input().split())
print((x-1)*(y-1))

'''
ABC069 A - K-City
https://atcoder.jp/contests/abc069/tasks/abc069_a
'''
n, m = list(map(int, input().split()))
ans = (n-1)*(m-1)
print(ans)


n, m = map(int, input().split())

ans = (n-1) * (m-1)
print(ans)

with open(0) as f:
    n, m = map(int, f.read().split())
print((n-1)*(m-1))

n, m = map(int, input().split())
print((n - 1) * (m - 1))

N,M = map(int,input().split())
print((N-1)*(M-1))

a,b=map(int,input().split())

print((a-1)*(b-1))

n, m = map(int, input().split())
print((n-1)*(m-1))

n, m = list(map(int, input().split()))
# D = list(map(int,input().split()))
# S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]

print(((n - 1) * (m - 1)))


a, b = map(int, input().split())
print((a-1)*(b-1))