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

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

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

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

Solution (Python):
nm = list(map(int, input().split()))
print((nm[0]-1)*(nm[1]-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):
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*~-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):
test_input = input().split()
n = int(test_input[0])
m = int(test_input[1])
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):
int_n, int_m = map(int, input().split())

print((int_n - 1) * (int_m - 1))

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

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

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

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

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

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

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

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

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

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

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


abc069_a()

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


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

Solution (Python):
N, M = [int(_) for _ in input().split()]

print((N-1)*(M-1))

Solution (Python):
from statistics import mean, median,variance,stdev
import sys
import math

a = input().split()


x = int(a[0])
y = int(a[1])
x-=1
y-=1
print(x*y)

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

Solution (Python):

n,m =map(int,input().split())
print("{}".format((n-1)*(m-1)))

Solution (Python):



def main():
    """Function."""
    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=[int(i) for i in input().split()]
print((n-1)*(m-1))

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

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

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

Solution (Python):
N, M = [int(_) for _ in input().split()]
print((N-1)*(M-1))

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

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

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

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

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

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

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

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

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

Solution (Python):
a=input().strip().split(" ")

b=[int(i) for i in a]

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

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

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

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

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

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

Solution (Python):

t = [int(s) for s in input().rstrip().split()]
n = (t[0] - 1) * (t[1] - 1)
print(n)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):

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

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

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

Solution (Python):


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

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

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

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

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

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

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

Solution (Python):
print(eval('~-'+input().replace(' ','*~-')))

Solution (Python):
s=1
for i in input().split():s*=~-int(i)
print(s)

Solution (Python):
print(eval('('+input().replace(' ','-1)*(')+'-1)'))

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

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

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

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

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

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

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

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


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

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

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

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return




dp = None


def main():
    n, m = li_input()
    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=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):
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):

def main():
    n, m = map(int, raw_input().split())

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


if __name__ == "__main__":
    main()

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

Solution (Python):

from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
AtoZ = [chr(i) for i in range(65,65+26)]
atoz = [chr(i) for i in range(97,97+26)]

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

N,M = inpl()
print((N-1)*(M-1))

Solution (Python):


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

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

if __name__ == '__main__':
    main()

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

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

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

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

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

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

Solution (Python):
r, c = (int(x) for x in raw_input().split())
print (r-1)*(c-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):
a,b=map(int,input().split())

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

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

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

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

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

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

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

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

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

Solution (Python):


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

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

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

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

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

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

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

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

Solution (Python):

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

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

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

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

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


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

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

def getinputdata():

    
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

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

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

Solution (Python):





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

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

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

Solution (Python):
n,m=[int(i) for i in 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):
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):
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 = [int(w) for w in sys.stdin.readline().split()]
a = (n - 1) * (m - 1)
print(a)

Solution (Python):


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

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

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

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 = [int(i) for i in input().split()]

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

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

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

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

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

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

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

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

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

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

Solution (Python):
idx = input()
nm = idx.split()

n = int(nm[0]) - 1
m = int(nm[1]) - 1

print(n * m)

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

Solution (Python):


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

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

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

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

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

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

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

area = (n+1) * (m+1)
o = m * 2 + (n) * 2
print(area - o)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):

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

Solution (Python):
a,b=[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())
x = (int(n) - 1) * (int(m) - 1)
print(x)

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

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


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


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

print("{0}".format(result))

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

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

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

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

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

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):
def read_int_list():
    return (int(i) for i in input().split())

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