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

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math
import itertools
 




 
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    n,m = inputMap()
    
    print((n-1) * (m-1))
    
    
if __name__ == "__main__":
	main()

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

Solution (Python):




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


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

Solution (Python):

n,m = [int(i) for i in input().split()]

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

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 = input()
print(((int(a.split(' ')[0]) - 1) * (int(a.split(' ')[1]) - 1)))

Solution (Python):
n,m = list(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 = [int(elem) for elem in 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 permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

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

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

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

n = int(n)
m = int(m)


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

Solution (Python):
a, b = map(int, input().split())
print((a-1) * (b-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 permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, M = MAP()
l = N - 1
w = M - 1
ans = l * w
print(ans)

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




if __name__ == '__main__':
    main()

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

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

Solution (Python):

import sys


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

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

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

Solution (Python):

import sys


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

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

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


abc()

Solution (Python):
a,b = map(int,input().split())
print((a-1)*(b-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 = [int(i) for i in 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):
a,b = map(int,input().split())
print(int((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((m - 1) * (n -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 = [ int(v) for v in 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):
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):
first = input()
(n,m) = first.split()
int_n = int(n)
int_m = int(m)
int_n -= 1
int_m -= 1
print(int_n*int_m)

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

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

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

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

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

Solution (Python):
l = list(map(int, input().split()));print((l[0]-1)*(l[1]-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, raw_input().split())
c = a - 1
d = b - 1
print c * d

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

Solution (Python):
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):
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 = [int(i) for i in input().split()]
if 2 <= n and m <= 100:
    a = int((n - 1)*(m - 1))
    print(a)

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

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]








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

Solution (Python):


def read_input():
    n, m = map(int, input().split())

    return n, m

def submit():
    n, m = read_input()
    print((n - 1)*(m - 1))



if __name__ == '__main__':
    submit()

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

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

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, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n,m = f()
    print((n-1)*(m-1))

solve()

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

Solution (Python):
a, b = (int(i)-1 for i in 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):
from functools import reduce
import math

def main():
    
    
    
    

    
    
    
    
    
    

    
    

    
    
    
    
    
    
    
    
    
    INF = float("inf")

    
    MOD = 10**9+7
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    c, d = (int(_) for _ in input().split())      
    print(((c-1)*(d-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):
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def inpm(line):
    return [inp() for _ in range(line)]


def inpfm(line):
    return [inpf() for _ in range(line)]


def inpsm(line):
    return [inps() for _ in range(line)]


def inlm(line):
    return [inl() for _ in range(line)]


def inlfm(line):
    return [inlf() for _ in range(line)]


def inlsm(line):
    return [inls() for _ in range(line)]


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper

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

Solution (Python):

n, m = list(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):
a,b=map(int,input().split())
print((a-1)*(b-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 = 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(n) for n 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*m - n - 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):
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 = [int(item) for item 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):
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] = 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, 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):
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(' '))
a=n-1
b=m-1
print(a*b)

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

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

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    n, m = map(int, input().split())

    return (n-1) * (m-1)


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

Solution (Python):
x,y = map(int,input().split())

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

Solution (Python):


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

print(max(0,(n-1)*(m-1)))

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

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 = 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):
def k_city(n: int, m: int)->int:
    return (n-1)*(m-1)


if __name__ == "__main__":
    n, m = map(int, input().split())
    ans = k_city(n, m)
    print(ans)

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

Solution (Python):
n, m = [int(_) for _ in 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 = [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):
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*b-a-b+1)

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

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


def C():
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    A()

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007


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



"""
n = I()
a = LI()
d = [0,0]
for i in a:
    if i%2:
        d[0] += 1
    if i%4 == 0:
        d[1] += 1
if n % 2:
    d[0] -= 1
d[0] -= d[1]
if d[0] <= 0:
    print("Yes")
else:
    print("No")
"""


"""
h,w = LI()
n = I()
a = LI()
c = [[None for x in range(w)] for y in range(h)]
i = 0
for y in range(h):
    if y%2:
        for x in range(w)[::-1]:
            if not a[i]:
                i += 1
            c[y][x] = i+1
            a[i] -= 1
    else:
        for x in range(w):
            if not a[i]:
                i += 1
            c[y][x] = i+1
            a[i] -= 1
for i in c:
    print(*i)
"""

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


if __name__ == '__main__':
    main()

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):
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 = [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):
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):
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):
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())
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):
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):
from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
print((a-1)*(b-1))

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

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

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

print(ans)
print()