Problem:
 ﻿Score: 100 points    Problem Statement  There is a farm whose length and width are A yard and B yard, respectively. A farmer, John, made a vertical road and a horizontal road inside the farm from one border to another, as shown below: (The gray part represents the roads.)   What is the area of this yard excluding the roads? Find it.      Note  It can be proved that the positions of the roads do not affect the area.      Constraints   A is an integer between 2 and 100 (inclusive).  B is an integer between 2 and 100 (inclusive).         Input  Input is given from Standard Input in the following format:  A  B       Output  Print the area of this yard excluding the roads (in square yards).        Sample Input 1 2 2      Sample Output 1 1  In this case, the area is 1 square yard.       Sample Input 2 5 7      Sample Output 2 24  In this case, the area is 24 square yards.

Solution (Python):
A, B = map(int, input().split())

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

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

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

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

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

Solution (Python):
def solve():
    a, b = map(int, input().split())
    return a * b - (a + b - 1)


if __name__ == "__main__":
    print(solve())

Solution (Python):
A,B=(int(x) for x in input().split())

C = A * B - (A + B - 1)

print(C)

Solution (Python):
a,b = (int(x) for x in 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():
    A, B = map(int, input().split())

    print(A * B - (A + B - 1))


main()

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

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

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

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

print(A*B-A-B+1)

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


if __name__ == "__main__":
    test()

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





inputa = input().split()





a = int(inputa[0])
b = int(inputa[1])





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

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

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

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

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

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

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

Solution (Python):

def main():


    N,K = map(int,input().split())

    print((N*K)-(N+K-1))


    
if __name__== "__main__":
    main()

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

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

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

Solution (Python):
A,B = map(int,input().split())
print(A*B-A-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):
import sys
input = sys.stdin.readline
from operator import itemgetter

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

if __name__ == '__main__':
	main()

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

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

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

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

nA = a * b - (a + b) + 1

print(nA)

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

Solution (Python):


A, B = map(int, input().rstrip().split())

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

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

Solution (Python):

def main():
    a,b = map(int, input().split())

    base = a*b
    line = a + b -1

    print(int(base-line))


if __name__ == '__main__' :
    main()

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

Solution (Python):
N = input().split()
A = int(N[0])
B = int(N[1])

print(A * B - (A + B - 1))

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

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

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

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

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

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

setrecursionlimit(1000000)


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

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

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

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

	return True

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

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

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

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

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

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

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

main()

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

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

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

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

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    

    
    
    
    
    
    

    
    

    
    
    
    
    
    
    
    
    
    INF = float("inf")

    
    MOD = 10**9+7
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    a, b = (int(_) for _ in input().split())  
    print((a-1)*(b-1))
    
if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
A, B = map(int, input().split())

print((A - 1) * (B - 1))

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

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

Solution (Python):
import numpy as np

a,b = map(int,input().split())

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

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

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

Solution (Python):

a,b=map(int,input().split())

s = a * b - a - b + 1
print(s)

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

Solution (Python):
A, B = map(int, input().split())


print((A*B) + 1 - A - B)

Solution (Python):
A,B = list(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):



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*B-(A+B-1))

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

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

print(field)

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

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

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

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

Solution (Python):
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    a, b = map(int, input().split())

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

Solution (Python):
A, B = map(int, input().split())

answer = A * B - A - B + 1
print(answer)

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

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

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

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

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
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
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
inf = float('INF')


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

Solution (Python):

A,B = [int(i) for i in input().split()]
X = (A * B) - (A + B) + 1
print(X)

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

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

Solution (Python):
A,B=(int(i) for i in input().split())
print(A*B-A-B+1)

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

Solution (Python):

l = list(map(int, input().split()))

print((l[0] - 1) * (l[1] - 1))

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

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

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

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

S = A * B
S -= A + B - 1

print(S)

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

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

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

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):
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 = list(map(int, input().split()))
print(a*b-a-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):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

A, B = nl()
print(A*B - A - 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 = list(map(int,input().split()))
print(a * b - a - 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*B - A - B + 1)

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

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

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

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

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

Solution (Python):

import sys


def solve(A: int, B: int):
    print((A-1)*(B-1))
    return



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

if __name__ == '__main__':
    main()

Solution (Python):

a, b = [ int(v) for v in 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, k = map(int, input().split())


answer = (n-1) * (k-1)


print(answer)

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


abc()

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

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

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

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

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

Solution (Python):
A,B = map(int, input().split())

print((A-1) * (B-1))

Solution (Python):
A,B = [int(i) for i in input().split()]
print((A-1) * (B-1))

Solution (Python):
A,B = map(int,input().split())

print(A*B-A-B+1)

Solution (Python):
A, B = [int(ab) for ab in 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())

S = (a-1) * (b-1)

print(S)

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

Solution (Python):
A, B = map(int, input().split())

print(int((A-1)*(B-1)))

Solution (Python):
a,b = list(map(int,input().split(" ")))
print(a*b-(a+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*b-a-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):
A, B = map(int,input().split())

print((A*B)-(A+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(int((a-1)*(b-1)))

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

Solution (Python):
first=input()
(A, B)=first.split()
A=int(A)
B=int(B)
answer=A*B-(B+A-1)
print(answer)

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
	
def main():
	A, B = map(int, input().split(" "))
	
	print((A-1)*(B-1))
	
	
if __name__ == "__main__":
	main()

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, raw_input().split())
print A*B - A - B + 1

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

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

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

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

import sys


def solve(A: int, B: int):
    print((A-1)*(B-1))
    return



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

if __name__ == '__main__':
    main()

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

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

def solve():
    a, b= f()
    print((a-1)*(b-1))

solve()

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

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

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

print(b*c-b-c+1)

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

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

print((A-1)*(B-1))

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

Solution (Python):
a, b = input().split()
a, b = int(a), int(b)
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*B-(A+B)+1)

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

Solution (Python):

"""
A - Garden
https://atcoder.jp/contests/abc106/tasks/abc106_a

"""
import sys


def solve(A, B):
    return (A*B) - A - B + 1


def main(args):
    A, B = map(int, input().split())
    ans = solve(A, B)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[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 = list(map(int, input().split()))

print(A*B - A-B+1)

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

Solution (Python):

l = list(map(int, input().split()))

print((l[0] - 1) * (l[1] - 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):
import sys


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








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

Solution (Python):
A, B = [int(i) for i in 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())
res = (a * b) - a - b + 1
print(res)

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

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

Solution (Python):


from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy
from collections import defaultdict


mod = 1


def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * y) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def combination(x, y):
    assert(x >= y)

    if y > x // 2:
        y = x - y

    ret = 1

    for i in range(0, y):
        j = x - i
        i = i + 1

        ret = ret * j
        ret = ret // i

    return ret


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def get_factors(x):
    retlist = []
    for i in range(2, int(x**0.5) + 3):
        while x % i == 0:
            retlist.append(i)
            x = x // i
    retlist.append(x)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in distance_list.items():
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance





def main():
    a, b = intin()
    print(a * b - a - b + 1)



if __name__ == '__main__':
    main()

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*B-A-B+1)