Problem: 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.

Submission attempts (in order):
line = input(),split(' ')
A, B = [int(i) for i in line]

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

print(S)

line = input(),split(' ')
A, B = [int(i) for i in line]

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

print(S)

import sys

array = input().split(' ')
a = array[0]
b = array[1]

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

import sys

array = input().split(' ')
a = array[0]
b = array[1]

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

S = input()
K = input()
flag = 0
for i in range(len(S)):
    if S[i] =="1":
        continue
    elif S[i] =="2":
        print("2")
        flag = 1
    elif S[i] =="3":
        print("3")
        flag = 1
    elif S[i] =="4":
        print("4")
        flag = 1
    elif S[i] =="5":
        print("5")
        flag = 1
    elif S[i] =="6":
        print("6")
        flag = 1
    elif S[i] =="7":
        print("7")
        flag = 1
    elif S[i] =="8":
        print("8")
        flag = 1
    elif S[i] =="9":
        print("9")
        flag = 1

    break
if flag == 0:
    print("1")


S = input()
K = input()
flag = 0
for i in range(len(S)):
    if S[i] =="1":
        continue
    elif S[i] =="2":
        print("2")
        flag = 1
    elif S[i] =="3":
        print("3")
        flag = 1
    elif S[i] =="4":
        print("4")
        flag = 1
    elif S[i] =="5":
        print("5")
        flag = 1
    elif S[i] =="6":
        print("6")
        flag = 1
    elif S[i] =="7":
        print("7")
        flag = 1
    elif S[i] =="8":
        print("8")
        flag = 1
    elif S[i] =="9":
        print("9")
        flag = 1

    break
if flag == 0:
    print("1")


a = input()
b = input()
A = int(a)
B = int(b)
print((A*B)-A-B + 1)

a = input()
b = input()
A = int(a)
B = int(b)
print((A*B)-A-B + 1)

line = input(),split(' ')
A, B = [int(i) for i in line]

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

print(S)

line = input(),split(' ')
A, B = [int(i) for i in line]

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

print(S)

import sys

array = input().split(' ')
a = array[0]
b = array[1]

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

import sys

array = input().split(' ')
a = array[0]
b = array[1]

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

S = input()
K = input()
flag = 0
for i in range(len(S)):
    if S[i] =="1":
        continue
    elif S[i] =="2":
        print("2")
        flag = 1
    elif S[i] =="3":
        print("3")
        flag = 1
    elif S[i] =="4":
        print("4")
        flag = 1
    elif S[i] =="5":
        print("5")
        flag = 1
    elif S[i] =="6":
        print("6")
        flag = 1
    elif S[i] =="7":
        print("7")
        flag = 1
    elif S[i] =="8":
        print("8")
        flag = 1
    elif S[i] =="9":
        print("9")
        flag = 1

    break
if flag == 0:
    print("1")


S = input()
K = input()
flag = 0
for i in range(len(S)):
    if S[i] =="1":
        continue
    elif S[i] =="2":
        print("2")
        flag = 1
    elif S[i] =="3":
        print("3")
        flag = 1
    elif S[i] =="4":
        print("4")
        flag = 1
    elif S[i] =="5":
        print("5")
        flag = 1
    elif S[i] =="6":
        print("6")
        flag = 1
    elif S[i] =="7":
        print("7")
        flag = 1
    elif S[i] =="8":
        print("8")
        flag = 1
    elif S[i] =="9":
        print("9")
        flag = 1

    break
if flag == 0:
    print("1")


a = input()
b = input()
A = int(a)
B = int(b)
print((A*B)-A-B + 1)

a = input()
b = input()
A = int(a)
B = int(b)
print((A*B)-A-B + 1)

# coding: utf-8
# Your code here!
a, b = [int(i) for i in input().split()]
s = (a - 1) * (b - 1)

print(s)


# coding: utf-8
# Your code here!
a, b = [int(i) for i in input().split()]
s = (a - 1) * (b - 1)

print(s)


# coding: utf-8
# Your code here!
a, b = [int(i) for i in input().split()]
s = (a - 1) * (b - 1)

print(s)


# coding: utf-8
# Your code here!
a, b = [int(i) for i in input().split()]
s = (a - 1) * (b - 1)

print(s)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted