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: Accepted

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

Submission status: Accepted

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy
N, M = 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))
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:

url = "https://atcoder.jp//contests/abc069/tasks/abc069_a"

def main():
    t = list(map(int, input().split()))
    print((t[0] - 1) * (t[1] - 1))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
count = 0
n,m = map(int,input().split())
for i in range(2,n+1):
  for j in range(2,m+1):
    count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
result = [int(i) for i in input().split()]
print((result[0] - 1) * (result[1] - 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:
print(eval("~-"+input().replace(" ","*~-")))

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(str((n - 1)*(m - 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:
# -*- coding: utf-8-*-
#strs = []
#n,k = map(int,input().split())
#hates = list(input().split())

n,m = map(int,input().split())
print((n-1) * (m-1))
#length = len(inputstr) - 2
#print('{}{}{}'.format(inputstr[0],length,inputstr[-1]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc069/tasks/abc069_a

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n, m = map(int, sys.stdin.readline().split())

def main():
    print((n - 1) * (m - 1))

if __name__ ==  '__main__':
    main()

Submission status: Accepted

Solution code:
# ABC 069: A – K-City
n, m = [int(s) for s 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:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    b, c = map(int, input().split())
    print((b-1)*(c-1))

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

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


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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 = (int(x) for x in input().split())
print((n-1)*(m-1))

Submission status: Accepted

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

Submission status: Accepted

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


def solve(n: int, m: int):
    print((n - 1) * (m - 1))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    n = int(next(tokens))  # type: int
    m = int(next(tokens))  # type: int
    solve(n, m)


if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

Solution code:
l = [int(x) for x in input().split(' ')]
print((l[0]-1)*(l[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((m - 1) * (n - 1))

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Problem A - K-City

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

# output process
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 = list(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:
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    n, m = list(map(int, sys.stdin.readline().split()))
    print((n-1)*(m-1))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - K-City
n,m=list(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,raw_input().split())
print (n-1)*(m-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    n,m=MI()
    print((n-1)*(m-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:
#069_A
n,m=map(int,input().split())
print((n-1)*(m-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:
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:
# -*- coding: utf-8 -*-

#----------
n,m = list(map(int, input().rstrip().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(lambda x:int(x)-1,input().split())
print(a*b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=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 = [int(i) for i in 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:
def kcity(n , m):

    return (n - 1) * (m - 1)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 入力 : 数字2つ
n, m = map(int, input().split())

# 出力　n-1 * m-1
ans = (n-1) * (m-1)
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
import calendar
import fractions
import itertools

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

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

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 29, Jan, 2020
"""

import sys
import itertools

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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


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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
a,b = map(int,input().split())
print((a-1)*(b-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n,m = [int(i) for i in 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())
r = (n-1)*(m-1)
print(int(r))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = input().split()
num_i = [int(s) for s in num]
n, m = num_i
area = (n-1) * (m-1)

print(area)

Submission status: Accepted

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

Submission status: Accepted

Solution code:


import numpy as np

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:
#A - K-City
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:
import sys


def solve(inp):
    A = list(map(int, inp.readline().strip().split(' ')))

    return str((A[0] - 1) * (A[1] - 1))


def main():
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b = (int(i) for i in 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*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:
s,t=map(int,input().split())
print((s-1)*(t-1))

Submission status: Accepted

Solution code:
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def gcd(a,b): #最大公約数
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b): #最小公倍数
    return a/gcd(a,b)*b

def divisors(a): # 約数列挙
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): #素数判定
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): #素数列挙
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def prime_fact(a): #素因数分解
    sqrt = math.sqrt(a)
    res = []
    i = 2
    if is_prime(a):
        res.append(a)
    else:
        while a!=1:
            while a%i==0:
                res.append(i)
                a //= i
            i += 1
    return res

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

if __name__=='__main__':
    main()

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:
import sys
input = sys.stdin.readline
n, m = [int(x) for x in 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:
n, m = map(lambda x: int(x), 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:
a,b= map(int,input().split())
print((a-1)*(b-1))

Submission status: Accepted

Solution code:
from sys import stdin
n,m = [int(x) for x in stdin.readline().rstrip().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:
n, m = map(int, input().split())
n -= 1
m -= 1
number_of_blocks = n * m
print(number_of_blocks)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n, m = map(int, sys.stdin.readline().split())

def main():
    return (n - 1) * (m - 1)
    
if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    n,m=MI()
    print((n-1)*(m-1))
main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC069a
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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:
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:
from sys import stdin
from itertools import groupby

a,b = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

#入力
n, m = map(int, input().split())
#N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def examA():
    n, m = LI()
    ans = (n-1)*(m-1)
    print(ans)


import sys
import copy
import bisect
import heapq
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examA()

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:
n,m = input().split()

n = int(n)

m = int(m)

n = n-1

m = m-1

print (n*m)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
n, m = (int(x) for x in sys.stdin.readline().split())
print((n - 1) * (m - 1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - K-City
n, m = [int(s) for s in input().split()]
print((n - 1) * (m - 1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 南北:m本、東西:n本
n,m = (int(x) for x in input().split())

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

Submission status: Accepted

Solution code:
# ABC069A - K-City
def main():
    N, M = map(int, input().split())
    ans = (N - 1) * (M - 1)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
n, m = list(map(int, input().split()))
def combi(x, y):
    return math.factorial(x) / (math.factorial(x - y) * math.factorial(y))

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:
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:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007

#A
def A():
    n, m = LI()
    print((n-1)*(m-1))
    return

#B
def B():
    s = S()
    print(s[0]+str(len(s)-2)+s[-1])
    return

#C
def C():
    II()
    a = LI()
    a1 = 0
    a2 = 0
    a3 = 0
    for ai in a:
        if not ai % 4:
            a3 += 1
            continue
        if not ai % 2:
            a2 += 1
            continue
        a1 += 1
    if a2:
        print(["No", "Yes"][a3 >= a1])
        return
    print(["No", "Yes"][a3 >= a1 - 1])
    return
"""
    n, m = LI()
    x = -1
    y = -1
    z = -1
    for i in range(n + 1):
        a = m - 9000 * i - 1000 * n
        if a % 4000 == 0 and a >= 0 and n - i - a / 4000 >= 0:
            y = a / 4000
            z = n - i - y
            x = i
            break
    print(int(x),int(y),int(z))
"""

#D
def D():
    move = [[1, 0], [0, 1], [-1, 0], [0, -1]]
    h, w = LI()
    II()
    a = LI()
    ans = [[None] * w for i in range(h)]
    x = 0
    y = 0
    diarect = 0
    for num, ai in enumerate(a, start=1):
        for _ in range(ai):
            ans[y][x] = num
            x += move[diarect][0]
            y += move[diarect][1]
            if 0 <= x < w and 0 <= y < h:
                if ans[y][x]:
                    x -= move[diarect][0]
                    y -= move[diarect][1]
                    diarect += 1
                    diarect %= 4
                    x += move[diarect][0]
                    y += move[diarect][1]
                continue
            x -= move[diarect][0]
            y -= move[diarect][1]
            diarect += 1
            diarect %= 4
            x += move[diarect][0]
            y += move[diarect][1]
            
    for a in ans:
        print(" ".join(map(str, a)))
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Accepted

Solution code:
input_line = input()
input_temp = input_line.split()
n = int(input_temp[0])
m = int(input_temp[1])

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
n=a[0]
m=a[1]

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

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    n ,m = list(map(int, input().rstrip('\n').split()))
    print((n - 1) * (m - 1))


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

ans = ~-a*~-b

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n,m = INTM()
    print((n-1)*(m-1))
if __name__ == '__main__':
    do()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())

## 数値
 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""


n, m = map(int, sys.stdin.readline().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:
#2019/09/18
n, m = map(int, input().split())
print((n-1) * (m-1))

Submission status: Accepted

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

num = (n - 1) * (m - 1)
print(str(num))

Submission status: Accepted

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

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

Submission status: Accepted

Solution code:
x=list(input().split())
x1=int(x[0])-1
x2=int(x[1])-1
print(x1*x2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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