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):
a=input()
b=input()
if a>1 and b>1:
  C=(a-1)*(b-1)
else:
  break
print(C)

a=input()
b=input()
if a>1 and b>1:
  C=(a-1)*(b-1)
else:
  break
print(C)

S=input()
K=int(input())
l=len(S)
r=0
q=0
if l==1:
    print(int(S))
else:
    for i in range(0,l-1):
        if int(S[i]) != 1:
            r=int(S[i])
            q=i
            break
    if q>K:
        print(1) 
    else:
        print(r)

S=input()
K=int(input())
l=len(S)
r=0
q=0
if l==1:
    print(int(S))
else:
    for i in range(0,l-1):
        if int(S[i]) != 1:
            r=int(S[i])
            q=i
            break
    if q>K:
        print(1) 
    else:
        print(r)

# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
C=(A-1)*(B-1)
print(C)

# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
C=(A-1)*(B-1)
print(C)

A=int(input())
B=int(input())
if A>1 and B>1:
  C=(A-1)*(B-1)
else:
  break
print(C)

A=int(input())
B=int(input())
if A>1 and B>1:
  C=(A-1)*(B-1)
else:
  break
print(C)

# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
C=(A-1)*(B-1)
print("{}".format(C))

# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
C=(A-1)*(B-1)
print("{}".format(C))

A=int(input())
B=int(input())
C=(A-1)*(B-1)
print(C)

A=int(input())
B=int(input())
C=(A-1)*(B-1)
print(C)

a=input()
b=input()
if a>1 and b>1:
  C=(a-1)*(b-1)
else:
  break
print(C)

a=input()
b=input()
if a>1 and b>1:
  C=(a-1)*(b-1)
else:
  break
print(C)

S=input()
K=int(input())
l=len(S)
r=0
q=0
if l==1:
    print(int(S))
else:
    for i in range(0,l-1):
        if int(S[i]) != 1:
            r=int(S[i])
            q=i
            break
    if q>K:
        print(1) 
    else:
        print(r)

S=input()
K=int(input())
l=len(S)
r=0
q=0
if l==1:
    print(int(S))
else:
    for i in range(0,l-1):
        if int(S[i]) != 1:
            r=int(S[i])
            q=i
            break
    if q>K:
        print(1) 
    else:
        print(r)

# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
C=(A-1)*(B-1)
print(C)

# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
C=(A-1)*(B-1)
print(C)

A=int(input())
B=int(input())
if A>1 and B>1:
  C=(A-1)*(B-1)
else:
  break
print(C)

A=int(input())
B=int(input())
if A>1 and B>1:
  C=(A-1)*(B-1)
else:
  break
print(C)

# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
C=(A-1)*(B-1)
print("{}".format(C))

# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
C=(A-1)*(B-1)
print("{}".format(C))

A=int(input())
B=int(input())
C=(A-1)*(B-1)
print(C)

A=int(input())
B=int(input())
C=(A-1)*(B-1)
print(C)

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

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

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

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

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

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted