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 = 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):
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())
c=a-1
d=b-1
print(c*d)

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

Solution (Python):
n, m = map(lambda x: int(x) - 1, 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):
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






























def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n, m = mi()
    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):
n,m=map(int,input().split())
print((n-1)*(m-1))

Solution (Python):
x = input().split()
n = int(x[0])
m = int(x[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
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

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):
x,y=map(int,input().split())
print(x*y-x-y+1)

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

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

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):
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 = int(input())
m = int(input())
print((n - 1)  * (m - 1))
'''

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):
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):
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):
n, m = map(int, input().split())
print((n - 1) * (m - 1))

Solution (Python):
n,m=[int(_) for _ 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):

"""
Created on Thu May 14 12:07:59 2020

@author: shinba
"""

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):






import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


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





n,m = inputIL()

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

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):
import sys
import math
import bisect

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):
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())

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):
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((m-1)*(n-1))

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())
    ans = (n - 1) * (m - 1)
    print(ans)


if __name__ == "__main__":
    main()

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

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

if __name__ == '__main__':

    ABC_69_A()

Solution (Python):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7

n, m = ri_()
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()))
ans = (n - 1) * (m - 1)

print(ans)

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 = list(map(int,input().split()))
print((n-1)*(m-1))

Solution (Python):
def main():
    n,m = (int(x) for x in input().split())
    print((n+1)*(m+1)-2*(n+m))

if __name__ == '__main__':
    main()

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

Solution (Python):
print(eval('*'.join(str(int(x)-1)for x in input().split())))

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):
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):
a,b = map(int,input().split())
print((a-1)*(b-1))

Solution (Python):
a,b=map(int,input().split())
print(a*b-a-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-1)*(m-1))

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

n, m = [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 - 1) * (m - 1))

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
 
n, m = MAP()
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):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections


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):
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):
def resolve():
	n, m = map(int, input().split())
	print((n-1)*(m-1))
resolve()

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):
n = list(map(int,input().split()))

print((n[0]-1)*(n[1]-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):
a,b=map(int,input().split())
print((a-1)*(b-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):
a,b=map(int,input().split())
print(~-a*~-b)

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):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7

a,b=MI()
print(a*b-a-b+1)

Solution (Python):
x = input().split()
n = int(x[0])
m = int(x[1])
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):
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):
n, m = map(int, input().split())
N = int(n - 1)
M = int(m - 1)

print(int(N * M))

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):

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


if '__main__' == __name__:
    resolve()

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=[int(i)for i in input().split()]
print((n-1)*(m-1))

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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


if __name__ == '__main__':
    resolve()

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(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())
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) )

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

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):
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():
    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):
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())
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))

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):
i = list(map(int, input().split()))
print((i[0]-1)*(i[1]-1))

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

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):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

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

Solution (Python):
from sys import stdin,setrecursionlimit
setrecursionlimit(10 ** 7)
n,m = map(int,stdin.readline().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())
print((n-1)*(m-1))

Solution (Python):
n,m = [int(i) for i in input().rstrip().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())

n -= 1
m -= 1

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):
from heapq import heappush, heappop
from itertools import permutations, accumulate
import math
import bisect
from collections import defaultdict, deque
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):
def main():
    N, M = (int(i) for i in input().split())
    print((N-1)*(M-1))


if __name__ == '__main__':
    main()

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

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


if __name__ == '__main__':
    main()

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):
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(int((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())
n -= 1
m -= 1
print(n * m)

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

Solution (Python):
icase=0    
if icase==0:
    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 heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy
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):
def main():
    n, m = map(int, input().split())
    print((n-1)*(m-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-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):

url = "https://atcoder.jp//contests/abc069/tasks/abc069_a"

def main():
    t = list(map(int, input().split()))
    print((t[0] - 1) * (t[1] - 1))

if __name__ == '__main__':
    main()

Solution (Python):

url = "https://atcoder.jp//contests/abc069/tasks/abc069_a"

def main():
    t = list(map(int, input().split()))
    print((t[0] - 1) * (t[1] - 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())
print((a-1)*(b-1))

Solution (Python):
count = 0
n,m = map(int,input().split())
for i in range(2,n+1):
  for j in range(2,m+1):
    count += 1
print(count)

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):
n, m = input().split()
print((int(n) - 1) * (int(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):
result = [int(i) for i in input().split()]
print((result[0] - 1) * (result[1] - 1))

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

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

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

Solution (Python):
print(eval("~-"+input().replace(" ","*~-")))

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(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):
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=[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 = 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):
a,b=map(int,input().split())
print(~-a*~-b)

Solution (Python):
n, m = map(int, input().split())
print((min(n, m) - 1) * (min(n, m) - 1) + abs(n - m) * (min(n, m) - 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):
a,b = map(int, input().split())
print((a-1) * (b-1))

Solution (Python):
n, m = map(int, input().strip().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):


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())
print((a-1)*(b-1))

Solution (Python):
import itertools
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):
import sys

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

def main():
    print((n - 1) * (m - 1))

if __name__ ==  '__main__':
    main()

Solution (Python):

n, m = [int(s) for s in 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):
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
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    b, c = map(int, input().split())
    print((b-1)*(c-1))

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

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

n,m = iim()
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()
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*M-N-M+1)

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