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:



Sample input:
3 4


Sample output:
6

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()

L=len(s)
L_a=L-2

print(s[0]+str(L_a)+s[-1])

Submission status: Wrong Answer

Solution code:
from sys import stdin, stdout

def main():
    line = stdin.readline()
    parts = line.split()
    m= int(parts[1])
    n = int(parts[1])
    stdout.write(str((n-1)*(m-1)))

main()

Submission status: Wrong Answer

Solution code:
from sys import stdin,stdout

def main():
    line=stdin.readline()
    parts=line.split()
    a=int(parts[0])
    b=int(parts[0])
 
    stdout.write(str((a-1)*(b-1)))
main()

Submission status: Wrong Answer

Solution code:
def blocks(n,m):
    n=int(n)
    m=int(m)
    print(n*m)

Submission status: Wrong Answer

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

if n == m:
    print((n-1)*(m-1))
else:
    print(n*m//2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
N = len(s)
print(s[0] + str(N - 2) + s[N - 1])

Submission status: Wrong Answer

Solution code:
n, *a = map(int, open(0).read().split())
f = 0
t = 0
for i in a:
    if i % 4 == 0:
        f += 1
    elif i % 2 == 0:
        t += 1
if len(a) == 1 and f == 0:
    print("No")
    quit()
if 2*f + t >= len(a):
    print('Yes')
    quit()
elif 2*f + t + 1 == len(a) and f != 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
print(s[0] + str(len(s)-2) + s[-1])

Submission status: Wrong Answer

Solution code:
s=input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Submission status: Wrong Answer

Solution code:
s=input()
print(s[0]+"(len(s)-2)"+s[-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
print("s[0]" + "str(len(s))" + "s[-1]")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    s = input()

    print(s[0] + str(len(s)-2) + s[-1])

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
voca = input()
 
output = voca[0] + str(len(voca) - 2) + voca[-1]
 
print(output)

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
print(n * m // 2)

Submission status: Wrong Answer

Solution code:
# AtCoder
n, m = map(int, input().split())
print(n*m//2)

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
s = abs(n-m)

print((n-s)*(m-s))

Submission status: Wrong Answer

Solution code:
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
x = len(s) - 2
print(s[0] + str(x) + s[-1])

Submission status: Wrong Answer

Solution code:
s=input()
print(s[0]+str((len(s)-2))+s[-1])

Submission status: Wrong Answer

Solution code:
s=input()
n=int(s.split(" ")[0])
m=int(s.split(" ")[1])
n=n-1
print(n)
m=m-1
print(m)
r=n*m
print(r)

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
print(n*m // 2)

Submission status: Wrong Answer

Solution code:
string = input()
string_length = len(string)
print(string[0] + "%d" % (string_length - 2) + string[string_length - 1])

Submission status: Wrong Answer

Solution code:
s = input()
a = len(s)
print(s[0] + str(a-2) + s[a-1])

Submission status: Wrong Answer

Solution code:
s = input()
a = len(s)-2
print(s[0]+str(a)+s[len(s)-1])

Submission status: Wrong Answer

Solution code:
s = input()
a = len(s)-2
print(s[0]+'a'+s[len(s)-1])

Submission status: Wrong Answer

Solution code:
n,m=map(int,raw_input().split())
print (n*m)/2

Submission status: Wrong Answer

Solution code:
s = input()
print(s[1]+str(len(s[1:-1]))+s[-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

s = input()
print(s[0]+str((len(s)-2))+s[-1])

Submission status: Wrong Answer

Solution code:
s = input()

a = s[0]
b =len(s)-2
c = s[-1]

print( str(a) + str(b) + str(c))

Submission status: Wrong Answer

Solution code:
s = input()

a = s[0]
b =len(s)-2
c = s[-1]

print(a+str(b)+c)

Submission status: Wrong Answer

Solution code:
s = input()
ss = len(s) - 2
print(s[0] + str(ss) + s[-1])

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
print(s[0] + str(n - 2) + s[-1])

Submission status: Wrong Answer

Solution code:
str = input()
a = len(str)
b = a-2
print("{}{}{}".format(str[0],b,str[a-1]))

Submission status: Wrong Answer

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

tate = a+1
yoko = b+1

print(tate*yoko - (tate*2 + tate*2 -4))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Submission status: Wrong Answer

Solution code:
s = str(input())
print(s[0]+str(len(s)-2)+s[-1])

Submission status: Wrong Answer

Solution code:
s = input()
print(s[0]+str(len(s))+s[-1])

Submission status: Wrong Answer

Solution code:
s = str(input())
print(s[0]+str(len(s))+s[-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
word=str(input())
print(word[0]+str(len(word)-2)+word[-1])

Submission status: Wrong Answer

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

print((n - 2) * (m - 2))

Submission status: Wrong Answer

Solution code:
s = input()

first = s[0]
mid = (len(s)-2)
fin = s[-1]
ans = first + str(mid) + fin

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
l = n * m
ans = l // 2
print(str(ans))

Submission status: Wrong Answer

Solution code:

s = input()

number = len(s) - 2

print(s[0] + str(number) + s[-1])

Submission status: Wrong Answer

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

if __name__ == '__main__':
    print(main())

Submission status: Wrong Answer

Solution code:
s = input()
print(s[:1] + str(len(s[1:-1])) + s[-1:])

Submission status: Wrong Answer

Solution code:
a=input()
b = int(len(a))-2
print("{}{}{}".format(a[0],b,a[int(len(a))-1]))

Submission status: Wrong Answer

Solution code:
a=input()
b = int(len(a))-2
print(a[0]+str(b)+a[int(len(a))-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
print((n-1)*(m-1) if (n-1) > 1 and (m-1) > 1 else 0)

Submission status: Wrong Answer

Solution code:
s = input()
l= len(s)-2
x=s[0]
y=s[-1]
print(x+str(l)+y)

Submission status: Wrong Answer

Solution code:
s = input()

print(s[0] + str(len(s)-2) + s[-1])

Submission status: Wrong Answer

Solution code:
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
print((n*m)/2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
N=len(s)-2
print(s[0]+str(N)+s[-1:])

Submission status: Wrong Answer

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

print(n-1*m-1)

Submission status: Wrong Answer

Solution code:
a=input()
print(a[0]+str(len(a)-2)+a[-1])

Submission status: Wrong Answer

Solution code:
n = input()
print("{}{}{}".format(n[0],len(n[1:-1]),n[-1]) )

Submission status: Wrong Answer

Solution code:
n,m = map(int, input().split())
print(n*m//4*2)

Submission status: Wrong Answer

Solution code:
s=input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Submission status: Wrong Answer

Solution code:
s = input()
lis = [s[:1],str(len(s)-2),s[-1]]
print("".join(lis))

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
x = 2 * ((n - 2) + (m - 2))
if x < 0:
  x = 0
print(x)

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
x = (n - 2) + (m - 2)
ans = 1
for i in range(x):
  ans *= 2
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
a=s[0]
b=s[-1]
m=str(len(s)-2)
print(a+m+b)

Submission status: Wrong Answer

Solution code:
sin=str(input())
sout=sin[0]+str(len(sin)-2)+sin[len(sin)-1]
print(sout)

Submission status: Wrong Answer

Solution code:
sin=str(input())
sout=sin[0]+str(len(sin)-1)+sin[len(sin)-1]
print(sout)

Submission status: Wrong Answer

Solution code:
sin=str(input())
sout=sin[0]+str(len(sin))+sin[len(sin)-1]
print(sout)

Submission status: Wrong Answer

Solution code:
s = input()
print(s[0] + str(len(s[:-2])) + s[-1])

Submission status: Wrong Answer

Solution code:
s = input()
print( s[0] + str(len(s)-2) + s[-1] )

Submission status: Wrong Answer

Solution code:
letters = input()
n = len(letters)
print(letters[0] + str(n-2) + letters[n-1])

Submission status: Wrong Answer

Solution code:
s = input()

s = s.replace(s[1:len(s)-1], str(len(s)-2), 1)
print(s)

Submission status: Wrong Answer

Solution code:
print(int(eval(input().replace(' ','*'))/2))

Submission status: Wrong Answer

Solution code:
a = input()
print(a[:1]+str(len(a)-2)+a[-1:])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
num = str(len(s) - 2)
print(s[0] + num + s[len(s)-1])

Submission status: Wrong Answer

Solution code:
a,*b,c = map(str,input())
print(a+str(len(b))+c)

Submission status: Wrong Answer

Solution code:
a, *b, c = input()
print(a, len(b), c, sep="")

Submission status: Wrong Answer

Solution code:
S=input()
a=str(len(S)-2)
print(S[:1]+a+S[-1:])

Submission status: Wrong Answer

Solution code:
s=input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Submission status: Wrong Answer

Solution code:
S = input()
print(S[0]+str(len(S)-2)+S[len(S)-1])

Submission status: Wrong Answer

Solution code:
S=input()
f=S[0]
l=S[-1]
m=len(S)-2
print(f+str(m)+l)

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
st = s[0]
sm = str(l - 2)
sb = s[l-1]
ss = st+sm+sb
print(ss)

Submission status: Wrong Answer

Solution code:
s=input()
print(s[0])
print(str(len(s)-2))
print(s[-1])

Submission status: Wrong Answer

Solution code:
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
print(n*m//4)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math

a = input().split()
#y = input().split()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
print(int(a*b/2) if a >2 or b>2 else 1)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
print(a*b/2 if a >2 or b>2 else 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = raw_input()
length = len(S)

print '{0}{1}{2}'.format(S[0], length-2, S[length-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
if n > 2 and m > 2 :
    print((n-2)*(m-2))
elif n == 2 and m == 2 :
    print(1)

else :
    print(max(n,m)-1)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
print((a-1)*(b-1) if (a-1)*(b-1) >= 4 else 0)

Submission status: Wrong Answer

Solution code:
numone,numtwo = map(int,input().split())
product = numone * numtwo
if product >= 6:
    answer = 2 + (product-4) // 2
    print(answer)

elif product == 4:
    print(1)

else:
    print(0)

Submission status: Wrong Answer

Solution code:
input_str = input('')
start = input_str[:1]
end = input_str[-1:]
print(start + str((len(input_str) - 2)) + end)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

j = 0

for i in s:
    if j == 0:
        x = i
    z = i
    j = int(int(j) + 1)
y = int(int(j) - 2)

ans = str(str(x) + str(y) + str(z))
print(ans)

Submission status: Wrong Answer

Solution code:
#print('<入力>')
n,m = map(int,input('n m = ').split())

x = (int(n) - 1) * (int(m) - 1)

#print('<出力>')
print(x)

Submission status: Wrong Answer

Solution code:
print('<入力>')
n,m = map(int,input('n m = ').split())

x = (int(n) - 1) * (int(m) - 1)

print('<出力>')
print(x)

Submission status: Wrong Answer

Solution code:
n, m = list(map(int, input("test").split()))
print (str((n-1)*(m-1)))

Submission status: Wrong Answer

Solution code:
ls = list(input())
print(ls[0] + str(len(ls)-2) + ls[-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
print(s[0] + str(len(s)-2) +s[len(s)-1])

Submission status: Wrong Answer

Solution code:
s = input()
print(s[0] + str(len(s[1:len(s) - 1])) + s[len(s) - 1])

Submission status: Wrong Answer

Solution code:
sen = raw_input()
length = len(sen)
print(sen[0:1] + str(length - 2) + sen[length-1:length])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(sum([int(x)-1 for x in input().split()]))

Submission status: Wrong Answer

Solution code:
string=input('')
first=string[0]
last=string[len(string)-1]
mid=str(len(string[1:len(string)-1]))
print(first+mid+last)

Submission status: Wrong Answer

Solution code:
chr = input()
chr_list = list(chr)
length = len(chr_list)

a, z =  chr_list[0], chr_list[length - 1]

print(a, length - 2, z, sep = '')

Submission status: Wrong Answer

Solution code:
s = input()

length = len(s)
ans = s[0] + str(length - 2) + s[-1]
print(ans)

Submission status: Wrong Answer

Solution code:
words = input()
l = len(words)
output = words[0] + str(l-2) + words[l-1]
print(output)

Submission status: Wrong Answer

Solution code:
a = raw_input()
print a[0] + str(len(a)-2) + a[-1]

Submission status: Wrong Answer

Solution code:
'''input
1 2
'''
n , m = map(int ,raw_input().split())
if n == 1 or m == 1:
	print "0"
else:
	print n*m//2

Submission status: Wrong Answer

Solution code:
'''input
4 4 4
'''
n , m = map(int ,raw_input().split())
print n*m//2

Submission status: Wrong Answer

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

print (n-1 * m - 1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y=map(int,input().split())

print((x-1)*(y-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
with open(0) as f:
    n, m = map(int, f.read().split())
print((n-1)*(m-1))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#
# abc069 a
#
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """3 4"""
        output = """6"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """2 2"""
        output = """1"""
        self.assertIO(input, output)


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


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    x, y = map(int, readline().split())

    print((x - 1) * (y - 1))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(ans)

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

if n == 1 or m == 1:
    print(0)
else:
    print((n - 1) * (m - 1))

Submission status: Accepted

Solution code:
n, m = map(int, input().split())
# D = list(map(int,input().split()))
# S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#n = int(input())
n,m = map(int,input().split())
#l = list(map(int,input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
print((m-1)*(n-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    n, m = i_map()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout


def main():
    line = stdin.readline()
    parts = line.split()
    a = int(parts[0])
    b = int(parts[1])

    rta = (a-1)*(b-1)
    stdout.write(str(rta))


main()

Submission status: Accepted

Solution code:
from sys import stdin, stdout


def main():
    line = stdin.readline()
    parts = line.split()
    n = int(parts[0])
    m = int(parts[1])
    stdout.write(str((n-1)*(m-1)))


main()

Submission status: Accepted

Solution code:
from sys import stdin, stdout

def main():
    line = stdin.readline()
    parts = line.split()
    m= int(parts[0])
    n = int(parts[1])
    stdout.write(str((n-1)*(m-1)))

main()

Submission status: Accepted

Solution code:
from sys import stdin,stdout

def main():
    line=stdin.readline()
    parts=line.split()
    a=int(parts[0])
    b=int(parts[1])

    stdout.write(str((a-1)*(b-1)))
main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N, M = map(int, readline().split())
    print((N-1)*(M-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, raw_input().split())
print (a-1) * (b-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [list(input()) for _ in range(n)]
#a = [int(input()) for _ in range(n)]


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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n,m = readInts()
print((n-1) * (m-1))