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

"""
http://abc069.contest.atcoder.jp/tasks/abc069_a
"""


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


if __name__ == '__main__':
    main()

Solution (Python):
from collections import defaultdict
from itertools import product, groupby
from math import pi
from collections import deque
from bisect import bisect, bisect_left, bisect_right
INF = 10 ** 10


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):
astr = input().split()
anum = []
for i in astr:
    anum.append(int(i))
print((anum[0]-1)*(anum[1]-1))

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

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


solve()

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

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

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

Solution (Python):


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

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, raw_input().split())

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

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

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

n -= 1
m -= 1

print (str(n * m))

Solution (Python):




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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
gosa = 1.0 / 10**9
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    n,m = LI()

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



print(main())

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

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

Solution (Python):
def read(): return list(map(int, input().split()))

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

Solution (Python):

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

Solution (Python):


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

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

print("%d" % ((n-1) * (m-1)))

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

Solution (Python):
a=map(int,raw_input('').split())
print (a[0]-1)*(a[1]-1)

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

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

print(ans)

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

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

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

print(ans)

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

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

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

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

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

Solution (Python):


n, m = tuple(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):
a = list(map((int),input().split(' ')))
n = a[0]
m = a[1]

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

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

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

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

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

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

Solution (Python):

def Solution(a,b):
    return (a-1)*(b-1)

if __name__=="__main__":
    input = raw_input().split(" ")
    print Solution((int)(input[0]), (int)(input[1]))

Solution (Python):


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

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

Solution (Python):
import sys




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


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


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    n, m = read_int_list()
    res = (n - 1) * (m - 1)
    print(res)

main()

Solution (Python):
if __name__ == '__main__':
    N = list(map(int, input().split()))
    print((N[0] - 1) * (N[1] - 1))

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

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

print(result)

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

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

Solution (Python):


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

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

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

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

Solution (Python):


n, m = map(int, raw_input().split())
print ((n+1)*(m+1))-(n*2+m*2)

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

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

Solution (Python):
l = map(int, input().split())
l = list(l)
print(str((l[0]-1)*(l[1]-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 ())
N-=1
M-=1
print (N*M)

Solution (Python):


import sys

def main(argv):
    for line in sys.stdin:
        n, m = map(lambda x: int(x), line.rstrip("\n").split(" ", 2))
        print((n - 1) * (m - 1))

if __name__ == "__main__":
    main(sys.argv)

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

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

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

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

Solution (Python):

input_cl = input().split()
input_cl = [int(i) for i in input_cl]
n = input_cl[0]
m = input_cl[1]
sector = (n-1) * (m-1)
print(sector)

Solution (Python):
import sys


def main():
    args = sys.stdin.readline().split()
    n = int(args[0])
    m = int(args[1])

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

main()

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

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


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):

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

Solution (Python):
a,b=map(int,raw_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):



nm = raw_input()
nm = nm.split()
nm = map(int, nm)



if nm[0] < 2 or nm[1] < 2:
    ans = 0
else:
    ans = (nm[0]-1)*(nm[1]-1)

print ans

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

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

a()

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)

main()

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

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

print(output)

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

Solution (Python):


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

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

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

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

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

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

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

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

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

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

Solution (Python):

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

Solution (Python):
input_line = map(int,raw_input().split(" "))
n = input_line[0]
m = input_line[1]

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

Solution (Python):



import sys
import re
import math
import collections
import itertools
import functools

DEBUG = True
DEBUG = False

def dbg(*args):
    if DEBUG:
        print("DBG: ", file=sys.stderr, end="")
        print(*args, file=sys.stderr)



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,raw_input().split())
print (n-1)*(m-1)

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