Problem:
 Score : 100 points    Problem Statement 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 1 3 4      Sample Output 1 6  There are six blocks, as shown below:          Sample Input 2 2 2      Sample Output 2 1  There are one block, as shown below:

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

Solution (Python):

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

Solution (Python):

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

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

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

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

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

Solution (Python):

n,m = (int(x) for x in input().split())

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

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

Solution (Python):

def main():
    N, M = map(int, input().split())
    ans = (N - 1) * (M - 1)
    print(ans)


if __name__ == "__main__":
    main()

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

Solution (Python):
import math
n, m = list(map(int, input().split()))
def combi(x, y):
    return math.factorial(x) / (math.factorial(x - y) * math.factorial(y))

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

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

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

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

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

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

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

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

Solution (Python):
n,m = map(int, input().split())

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

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

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

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

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

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

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

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

Solution (Python):

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

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007


def A():
    n, m = LI()
    print((n-1)*(m-1))
    return


def B():
    s = S()
    print(s[0]+str(len(s)-2)+s[-1])
    return


def C():
    II()
    a = LI()
    a1 = 0
    a2 = 0
    a3 = 0
    for ai in a:
        if not ai % 4:
            a3 += 1
            continue
        if not ai % 2:
            a2 += 1
            continue
        a1 += 1
    if a2:
        print(["No", "Yes"][a3 >= a1])
        return
    print(["No", "Yes"][a3 >= a1 - 1])
    return
"""
    n, m = LI()
    x = -1
    y = -1
    z = -1
    for i in range(n + 1):
        a = m - 9000 * i - 1000 * n
        if a % 4000 == 0 and a >= 0 and n - i - a / 4000 >= 0:
            y = a / 4000
            z = n - i - y
            x = i
            break
    print(int(x),int(y),int(z))
"""


def D():
    move = [[1, 0], [0, 1], [-1, 0], [0, -1]]
    h, w = LI()
    II()
    a = LI()
    ans = [[None] * w for i in range(h)]
    x = 0
    y = 0
    diarect = 0
    for num, ai in enumerate(a, start=1):
        for _ in range(ai):
            ans[y][x] = num
            x += move[diarect][0]
            y += move[diarect][1]
            if 0 <= x < w and 0 <= y < h:
                if ans[y][x]:
                    x -= move[diarect][0]
                    y -= move[diarect][1]
                    diarect += 1
                    diarect %= 4
                    x += move[diarect][0]
                    y += move[diarect][1]
                continue
            x -= move[diarect][0]
            y -= move[diarect][1]
            diarect += 1
            diarect %= 4
            x += move[diarect][0]
            y += move[diarect][1]
            
    for a in ans:
        print(" ".join(map(str, a)))
    return


if __name__ == '__main__':
    A()

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

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

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

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

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

Solution (Python):
input_line = input()
input_temp = input_line.split()
n = int(input_temp[0])
m = int(input_temp[1])

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

Solution (Python):
data = input().split(" ")
n = int(data[0])
m = int(data[1])
a = (n-1)*(m-1)
print(a)

Solution (Python):
n , m = map(int,input().split())

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

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

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

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

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

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

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

if __name__ == '__main__':
    main()

Solution (Python):
n, m = tuple(map(int, input().split()))
print((n - 1) * (m - 1))

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

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

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

Solution (Python):
a = list(map(int,input().split()))
n=a[0]
m=a[1]

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

Solution (Python):
n,m = map(int, input().split())

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

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

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

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

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

Solution (Python):
n, m = map(int,input().split())

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

Solution (Python):
n, m = map(int, input().split())

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

Solution (Python):
n,m=map(int,input().split())

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

Solution (Python):

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

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

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

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

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

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

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

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

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n ,m = list(map(int, input().rstrip('\n').split()))
    print((n - 1) * (m - 1))


if __name__ == '__main__':
    slove()

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

Solution (Python):
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

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

Solution (Python):
n,m = map(int,input().split())

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

Solution (Python):
a, b = map(int,input().split())

ans = ~-a*~-b

print(ans)

Solution (Python):
n,m=map(int,input().split())

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

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

Solution (Python):
n,m = map(int,input().split())

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

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

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

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

Solution (Python):
n, m = map(int, input().split())

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

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

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

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

Solution (Python):


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

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

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

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

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

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n,m = INTM()
    print((n-1)*(m-1))
if __name__ == '__main__':
    do()

Solution (Python):
n, m = map(int, input().split())

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

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

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

Solution (Python):
n,m = map(int,input().split())
area = (n-1)*(m-1)
print(area)

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

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

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

Solution (Python):
import sys
import math
from fractions import gcd





def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""


n, m = map(int, sys.stdin.readline().split())

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

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

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

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

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

Solution (Python):
n,m = map(int, input().split())

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

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

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

Solution (Python):

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

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

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

Solution (Python):
n, m = map(int, input().split())

num = (n - 1) * (m - 1)
print(str(num))

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


if __name__ == "__main__":
    resolve()

Solution (Python):

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

Solution (Python):


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

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

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

Solution (Python):
x=list(input().split())
x1=int(x[0])-1
x2=int(x[1])-1
print(x1*x2)

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

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

Solution (Python):
n, m = map(int, input().split())

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

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

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

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

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

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

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

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

Solution (Python):
n,m = map(int,input().split())

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

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

Solution (Python):
n,m = map(int,input().split())
print(n*m-n-m+1)

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

Solution (Python):
A = list(map(int, input().split()))
print((A[0]-1)*(A[1]-1))

Solution (Python):
n,m=map(int,input().split());print(~-n*~-m)

Solution (Python):
n,m = map(int,input().split())
print((n+1)*(m+1)-2*n-2*m)

Solution (Python):
n, m = map(int, input().split())

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

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
a,b=map(int,input().split())

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

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

Solution (Python):
n,m=map(int,input().split());print(~-n*~-m)

Solution (Python):
a,b=map(int,input().split())

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline

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


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
n, m = map(int, input().split())

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

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

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

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

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

Solution (Python):
s = input().split()
n, m = int(s[0]), int(s[1])
print((n - 1) * (m - 1))

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

Solution (Python):
n,m=map(int,input().split())

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

Solution (Python):
n, m = map(int, input().split())

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

Solution (Python):
import sys
import copy
import  math
import bisect
from collections import *
from operator import itemgetter
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n, m = na()
print((n - 1) * (m - 1))

Solution (Python):
n,m = (int(i) for i in input().split())

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

Solution (Python):
A,B = map(int, input().strip().split(' '))
print((A-1)*(B-1))

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

Solution (Python):
n = [int(_) for _ in input().split()]
if len(n) == 2 and all(2 <= item <= 100 for item in n):
    print((n[0] - 1) * (n[1] - 1))
else:
    print('hoge!')

Solution (Python):

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

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

Solution (Python):
n,m = map(int, input().split())
print(str((n-1)*(m-1)))

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
n,m = map(int, input().split())

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

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

Solution (Python):
def main():
    n, m = map(int, input().split())
    return (m-1) * (n-1)

if __name__ == '__main__':
    print(main())

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

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

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

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

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

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

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

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

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

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

Solution (Python):
n, m = (int(i) for i in input().split())
row = n - 1
col = m - 1
print(row*col)

Solution (Python):
n, m = map(int, input().split())
r = (n-1)*(m-1)
print(r)

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

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

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

Solution (Python):
n, m = map(lambda x: int(x) - 1, input().split())
print(n * m)

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

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

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

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

Solution (Python):
N, K = map(int, input().split())
print((N-1)*(K-1))

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

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

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

Solution (Python):
n,m = map(int, input().split())

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

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

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

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

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

Solution (Python):


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

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

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

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

Solution (Python):
a , b = [int(i) for i in input().split()]

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

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

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

Solution (Python):
(n, m) = (int(tok) for tok in input().split())
print((n - 1) * (m - 1))

Solution (Python):
n, m = map(int, input().split())

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

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

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

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

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

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

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

Solution (Python):
n, m  = map(int, input().split())

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
def main():
    x,y = map(int,input().split())
    print((x-1)*(y-1))
    
main()

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

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

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

Solution (Python):
n, m = map(int, input().split(' '))
print((n - 1) * (m - 1))

Solution (Python):
n, m = map(int, input().split())

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

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

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

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

Solution (Python):
a,b = map(int,input().split())

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

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

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

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

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

Solution (Python):
n, m = map(int, input().split())

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

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

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

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

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

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

Solution (Python):
n,m=map(int,input().split())

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

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

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

Solution (Python):
H,V = map(int,input().split())
print((H-1)*(V-1))

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

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

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

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

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

Solution (Python):
a, b = map(int,input().split())
print(~-a*~-b)

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

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

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

Solution (Python):

import sys
INF = float("inf")


def solve(n: int, m: int):
    print((n-1)*(m-1))
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    n = int(next(tokens))  
    m = int(next(tokens))  
    solve(n, m)


if __name__ == '__main__':
    main()

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

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

Solution (Python):
a, b = input().split()

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

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

Solution (Python):
n, m = map(int, input().split())

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

Solution (Python):
n,m = map(int, input().split())

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

Solution (Python):
a,b=map(int,input().split());print(~-a*~-b)

Solution (Python):

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

Solution (Python):

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

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

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

Solution (Python):

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

A = (n-1)*(m-1)

print(A)

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

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

Solution (Python):
n,m=map(int,input().split());print(~-m*~-n)

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

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

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

Solution (Python):


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

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

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

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

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

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

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

Solution (Python):
n, m = map(int, input().split())

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

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

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

Solution (Python):
n, m = map(int, input().split())

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

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

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

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

Solution (Python):
num = input().split()
print((int(num[0])-1)*(int(num[1])-1))

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

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

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

Solution (Python):
A,B = list(map(int,input().split()))
print((A-1)*(B-1))

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

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

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

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


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

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


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

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

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

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

Solution (Python):
r, c = [int(x) for x in input().split()]
print((r-1)*(c-1))