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

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

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

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

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

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

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


def main():
    sc = Scan()
    a, b = sc.intarr()

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

    print(ans)


def format_str(num):
    if num < 10:
        return "00" + str(num)
    elif num < 100:
        return "0" + str(num)
    else:
        return str(num)


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def intarr_ver(self, n):
        return [int(input()) for _ in range(n)]

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


def display(array):
    for a in range(len(array)):
        if len(array) - a != 1:
            print(array[a], end=' ')
        else:
            print(array[a])


def gcd(a, b):  
    while b:
        a, b = b, a % b
    return a


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


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

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

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

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

Solution (Python):
print(eval('('+input().replace(' ','-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 math



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

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

area = (A-1)*(B-1)

print(area)

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

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


def main():
    sc = Scan()
    a, b = sc.intarr()
    s = (a - 1) * (b - 1)
    print(s)


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def intarr_ver(self, n):
        return [int(input()) for _ in range(n)]

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


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-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):
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):
import sys
import math
input = sys.stdin.readline


def main():
    sc = Scan()
    a, b = sc.intarr()

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

    print(ans)


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def intarr_ver(self, n):
        return [int(input()) for _ in range(n)]

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


main()

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

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

m = A * B
x1 = A
x2 = B - 1
ans = m - x1 - x2

print(ans)

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

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

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

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

  
print(ret)

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 - 1) * (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())
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 = map(int, input().split())
print((A - 1) * (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*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):
from sys import stdin
from itertools import product


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

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

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

Solution (Python):




import sys














def main():
    a, b = (int(x) for x in sys.stdin.readline().split())
    area = a * b - (a + b - 1)
    print(area)



if __name__ == "__main__":
    
    main()

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):
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

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

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

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

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

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

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

Solution (Python):

a, b = [int(s) for s 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-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):
import sys
def input():
    return sys.stdin.readline()[:-1]
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):
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*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())
square = a * b - a * 1 - 1 * b + 1 * 1
print(square)

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())
    ans = (A - 1) * (B - 1)
    print(ans)


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

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

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

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

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

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

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

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

Solution (Python):
a, b = map(int, input().split())
area = a * b
print(area - 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):
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
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

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

A, B = MAP()

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

>>> main(2, 2)
1
>>> main(5, 7)
24'''


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


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

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

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

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

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    a, b = map(int, input().split())
    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):
def slove():
    import sys
    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip('\n').split()))
    print((a - 1) * (b - 1))


if __name__ == '__main__':
    slove()

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

field = A*B
road = A+B-1

print(field-road)

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

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

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

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

c = a - 1
d = b - 1
print(c*d)

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

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

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

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

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

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

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

Solution (Python):
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):
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):
M,N = [int(x) for x in input().split()]
print((M-1)*(N-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 = 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*b)-(a+b-1))

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

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

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

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
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):
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*b-(a+b-1))

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

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

Solution (Python):
import os, sys, re, math

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

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

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

Solution (Python):
line = raw_input()
a, b = [int(s) for s in line.split(' ')]
print (a - 1) * (b - 1)

Solution (Python):
import os, sys, re, math

lines = sys.stdin.readlines()

(A, B) = [int(i) for i in lines[0].split()]

print (A * B - (A + 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=[int(s) for s 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):
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-1) * (b-1))

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

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 = 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*~-b)

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):
source = input().split()
A, B = int(source[0]), int(source[1])
print(A * B - (A + B - 1))

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

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

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

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

a, b = na()
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(elem) for elem in 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):

import numpy as np

ab = list(map(int, input().split()))
ab = np.array(ab)

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

Solution (Python):
a, b = list(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):
N,M= [int(i) for i in 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):
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 = 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())
if 2 <= a or b <= 100:
    print((a - 1) * (b - 1))
else:
    print('hoge!')

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-1)*(B-1)
print(S)

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

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
s = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

a, b = na()
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):
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):
print(eval("("+input().replace(" ","-1)*(")+"-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):
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-1)*(y-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):
def main():
    A, B = map(int, input().split())
    return A*B - A - B + 1
if __name__ == '__main__':
    print(main())

Solution (Python):
import math
import sys
import queue
from collections import Counter
from itertools import accumulate
from fractions import gcd
from functools import reduce

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

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

mod = 1000000007

"""


    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())


    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

if __name__ == "__main__":
    A, B = map(int, sys.stdin.readline().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):
w,h=map(int,input().split())
print((w-1)*(h-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*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 = (int(i) for i in 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):
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))