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):
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):
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):
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):
s=input()
n=int(s.split(" ")[0])
m=int(s.split(" ")[1])
n=n-1

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

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

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

Solution (Python):
n, m = 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):
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 math

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

import sys


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


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):
a, b = map(int, input().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 = [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):
l = [int(x) for x 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 = 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((m - 1) * (n - 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, raw_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(i) for i in input().split()]

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

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

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

Solution (Python):
n, m = 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 = 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):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    n, m = list(map(int, sys.stdin.readline().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())
sq = (n - 1) * (m - 1)
print(sq)

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

Solution (Python):
n,m=map(int,raw_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):
x, y = list(map(int, input().split()))
print((x - 1) * (y - 1))

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    n,m=MI()
    print((n-1)*(m-1))

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

n,m=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())
if n <= 1 or m <= 1:
    print(0)
else:
    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):
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):
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 = 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())
print((n-1) * (m-1))

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

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

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

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

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


if __name__ == '__main__':
    main()

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):
n,m = 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):
a,b=map(int,input().split())
ans=(a-1)*(b-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):
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 = [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):
def kcity(n , m):

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

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


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

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




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):
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):
import math
import calendar
import fractions
import itertools

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

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

Solution (Python):
"""
author : halo2halo
date : 29, Jan, 2020
"""

import sys
import itertools



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

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

print(ans)

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

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

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

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):
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):
num = input().split()
num_i = [int(s) for s in num]
n, m = num_i
area = (n-1) * (m-1)

print(area)

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

Solution (Python):


import numpy as np

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

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

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

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

Solution (Python):
import sys


def solve(inp):
    A = list(map(int, inp.readline().strip().split(' ')))

    return str((A[0] - 1) * (A[1] - 1))


def main():
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
n, m = 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 math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def gcd(a,b): 
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

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

def divisors(a): 
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): 
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): 
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def prime_fact(a): 
    sqrt = math.sqrt(a)
    res = []
    i = 2
    if is_prime(a):
        res.append(a)
    else:
        while a!=1:
            while a%i==0:
                res.append(i)
                a //= i
            i += 1
    return res

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

if __name__=='__main__':
    main()

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):
import sys
input = sys.stdin.readline
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):
n, m = map(lambda x: int(x), 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):
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):
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):
from sys import stdin
n,m = [int(x) for x in 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):
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 = 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):
n,m = 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())
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())
n -= 1
m -= 1
number_of_blocks = n * m
print(number_of_blocks)

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

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

def main():
    return (n - 1) * (m - 1)
    
if __name__ == '__main__':
    ans = main()
    print(ans)

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

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

Solution (Python):
import sys

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    n,m=MI()
    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=(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())
a-=1
b-=1
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):
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((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):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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=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 = 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):
from sys import stdin
from itertools import groupby

a,b = [int(x) for x in stdin.readline().rstrip().split()]

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

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

if n==2 and m==2:
    print("1")
elif n==2 and m > 2:
    print(m-1)
elif m==2 and n > 2:
    print(n-1)
else:
    print((n-1)*(m-1))

Solution (Python):

import math


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

Solution (Python):
n,m=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 examA():
    n, m = LI()
    ans = (n-1)*(m-1)
    print(ans)


import sys
import copy
import bisect
import heapq
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examA()

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

n = int(n)

m = int(m)

n = n-1

m = m-1

print (n*m)

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

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

Solution (Python):

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

Solution (Python):
n,m=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
n, m = (int(x) for x in sys.stdin.readline().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))