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. 



Sample input:
2 2


Sample output:
1

Submission status: Accepted

Solution code:
import numpy as np

def input_numbers():
    temp = list(map(int, input().split()))
    return temp

def GCD(a, b):
    if(a < b):
        temp = a
        a = b
        b = temp
    a = a % b
    if(a == 0):
        return b
    else:
        return GCD(a, b)

x = input_numbers()

ans = (x[0] - 1) * (x[1] - 1)

print(ans)

Submission status: Accepted

Solution code:
int_a, int_b = map(int, input().split())

print((int_a - 1) * (int_b - 1))

Submission status: Accepted

Solution code:
dims = raw_input()
a,b = int(dims.split(" ")[0]),int(dims.split(" ")[1])
a -=1
b-=1
print(a*b)

Submission status: Accepted

Solution code:
import sys

def main():
  input = sys.stdin.readline
  A, B = map(int, input().split())
  print(A * B - A - B + 1)


if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A
a, b = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

sum = A + B -1
land_area = A * B
land_area -= sum
print(land_area)

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))
area = a*b
road1 = (a-1)*1
road2 = b*1
print(area-road1-road2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A, B = map( int, input().split(' '))

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

Submission status: Accepted

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

Submission status: Accepted

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


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""AtCoder"""

import sys
input = sys.stdin.readline

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

def main():
    na = list(map(int, input().split()))
    A, B = na[0], na[1]

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
  a, b = map(int, input().split())
  print((a*b) - (1*a + 1*b -1))  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

a = A-1
b = B-1

print(a*b)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
height, width = [int(i) for i in input().split()]

print((height - 1) * (width - 1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*-  coding: utf-8 -*-
n,m=map(int,input().split())
print("{}".format((n-1)*(m-1)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 値の取得
A, B = map(int, input().split())
# 計算、出力
print((A - 1) * (B - 1))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def solve(a, b):
    # Uncomment the following if you want to check the input.
    # print('a =', a)
    # print('b =', b)
    s=int(a)-1
    r=int(b)-1
    return s*r


def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    return (a, b)

def main():
    print(solve(*readQuestion()))

# Uncomment before submission
main()

Submission status: Accepted

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a, b):
    s=int(a)-1
    r=int(b)-1
    return s*r

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(' ')
    return (int(str_a), int(str_b))

def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
read_line = [int(i) for i in input().split()]
A = read_line[0]
B = read_line[1]

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input().strip().split(" ")
b=[int(i) for i in a]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B = list(map(int,input().split()))
miti = A + B - 1
hatake = A * B
print(hatake-miti)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,Y=input().split()
n=int(N)
y=int(Y)
print(n*y-n-y+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(eval("~-"+input().replace(" ","*~-")))

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def garden(x, y):
    return (x - 1) * (y - 1)

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(eval('~-'+'*~-'.join(input().split())))

Submission status: Accepted

Solution code:
A, B = [int(x) for x in input().split()]


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = list(map(int, input().split()))
print((N - 1) * (K - 1))

Submission status: Accepted

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

ans = A*B - A - B + 1

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B = map(int,raw_input().split())

print A*B - A - B + 1

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
a,b  = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8
A, B = map(int, input().split())
print((A-1)*(B-1))

Submission status: Accepted

Solution code:
#coding: utf-8
A, B = map(int, input().split())
print(A*B - A - B + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print("{}".format((a - 1) * (b - 1)))

Submission status: Accepted

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

tate = A - 1
yoko = B - 1
Area = tate * yoko
print(Area)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
a,b = map(int,input().split())
print ((a-1)*(b-1))

Submission status: Accepted

Solution code:
list1 = list(map(int, input().split()))
a = list1[0]
b = list1[1]
ans = a*b -a-b+1
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
try: from typing import Any, Union, List, Tuple, Dict
except ImportError: pass
sys.setrecursionlimit(10**6)
def debug(*args): print(*args, file=sys.stderr)
def exit(): sys.exit(0)

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    AB = [int(i) for i in input().split()]
    print((AB[0]-1)*(AB[1]-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inputs=input().split()
A=int(inputs[0])
B=int(inputs[1])
print((A-1) * (B-1))

Submission status: Accepted

Solution code:
#! /usr/bin/env python3

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A, B = map( int, input().split() )
print(A*B+1-A-B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
y = input().split()
H = int(y[0])
W = int(y[1])
print((H-1)*(W-1))

Submission status: Accepted

Solution code:
print((lambda x:(x[0]-1)*(x[1]-1))(list(map(int,input().split()))))

Submission status: Accepted

Solution code:
init = input().split(" ")
init = [int(c) for c in init]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8
#整数の入力
a,b = map(int, input().split())
if (a >= 2 and a <= 100) and (b >= 2 and b <= 100):
    area = a * b - (a + b) + 1

print(area)

Submission status: Accepted

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


print("%d" % ((a-1)*(b-1)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inputs = input().strip().split()

yoko = int(inputs[0])
tate = int(inputs[1])

print((yoko - 1) * (tate - 1))

Submission status: Accepted

Solution code:
num = input().split()

tate = int(num[0]) - 1
yoko = int(num[1]) - 1

result = tate * yoko

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
A, B = map(int, input().split())
print((A-1) * (B-1))

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
inp = input()
height, width = inp.split()

print( (int(height) - 1) * (int(width) - 1))

Submission status: Accepted

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

Submission status: Accepted

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

assert solve(2, 2) == 1
assert solve(5, 7) == 24
a, b = map(int, raw_input().split())
print solve(a, b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#let
A, B = map(int, input().split())

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

Submission status: Accepted

Solution code:
string = input()
a, b = int(string.split(' ')[0]), int(string.split(' ')[1])
result = a * b - (a + b -1)
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A = [int(i) for i in input().split(" ")]
ans = A[0] * A[1] - (1 * A[0] + 1 * A[1] -1)

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = (int(_) for _ in input().split())
print((a-1)*(b-1))

Submission status: Accepted

Solution code:
print(eval("(" + input().replace(" ", "-1)*(") + "-1)"))

Submission status: Accepted

Solution code:
def main7():
    buf = input("");
    bufs = buf.split();
    num = [];
    for i in range(2):
        num.append(int(bufs[i]));
    result = (num[0] - 1) * (num[1] - 1);
    print(result);



if __name__ == '__main__':
    main7()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8

INF = float('inf')
def inpl(): return list(map(int, input().split()))


a, b = inpl()
print((a - 1) * (b - 1))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#abc106a

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().split())

    # ans = AC(A, B)
    ans = editorial(A, B)
    print(ans)


def AC(A, B):
    ans = (A - 1) * (B - 1)
    return ans


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
A,B = map(int, sys.stdin.read().split())
print (A-1)*(B-1)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(area)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def getinputdata():

    array_result = []    
    array_result.append(input().split(" "))

    flg = True

    try:
        while flg:

            data = input()

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

                flg = True

            else:

                flg = False
    finally:

        return array_result

arr_data = getinputdata()

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


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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
A, B = (int(i) for i in input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = input().split()

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

Submission status: Accepted

Solution code:
data = input().split()
a = int(data[0])
b = int(data[1])
print(a * b - a - b + 1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(A,B):#106-A
    anser=A*B-(A+B-1)
    return anser

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(' ')
    return (int(str_a), int(str_b))

def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
a,b = list(map(int,input().split()))
print((a-1)*(b-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# encoding: utf-8
A, B = map(int, input().split())
print((A - 1) * (B - 1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

if __name__ == "__main__":

    A, B = map(int, input().split())
    print(solve(A, B))

Submission status: Accepted

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

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    a,b = LI()
    return (a-1)*(b-1)



print(main())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(R)

Submission status: Accepted

Solution code:
a, b = input().split(' ')

a = int(a)
b = int(b)

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

print(m2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = [int(_) for _ in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

Submission status: Accepted

Solution code:
import subprocess
A,B = map(int, subprocess.check_output("dd").split())
print (A-1)*(B-1)

Submission status: Accepted

Solution code:
from sys import stdin
a,b = map(int,stdin.readline().split())
print a*b + 1 - a- b

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_s = str(input())
[a, b] = list(map(int, input_s.split(" ")))
print((a-1)*(b-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

l = input().split()
a = int(l[0])
b = int(l[1])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = [int(x) for x in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# vim: set fileencoding=utf-8 :
a, b = map(int, raw_input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input().split()
a,b=int(s[0]),int(s[1])
print(a*b-a-b+1)

Submission status: Accepted

Solution code:
#!/usr/bin/env python

from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(10000000)

A, B = map(int, raw_input().split())
print (A - 1) * (B - 1)

Submission status: Accepted

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

def main():
    a, b = [int(i) for i in raw_input().strip().split()]
    print solution(a, b)

if __name__ == '__main__':
    main()