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:
A,B=list(map(int,input().split(" ")))

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

Submission status: Accepted

Solution code:
print(eval('('+input().replace(' ','-1)*(')+'-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 -*-
import math

#入力
#S = str(input())
A, B = map(int, input().split())
#R = int(input())

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

Submission status: Accepted

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

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

print(area)

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    sc = Scan()
    a, b = sc.intarr()
    s = (a - 1) * (b - 1)
    print(s)


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def intarr_ver(self, n):
        return [int(input()) for _ in range(n)]

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


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())
print ((a-1)*(b-1))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(int((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:
import sys
import math
input = sys.stdin.readline


def main():
    sc = Scan()
    a, b = sc.intarr()

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

    print(ans)


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def intarr_ver(self, n):
        return [int(input()) for _ in range(n)]

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


main()

Submission status: Accepted

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

Submission status: Accepted

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

m = A * B
x1 = A
x2 = B - 1
ans = m - x1 - x2

print(ans)

Submission status: Accepted

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

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

  
print(ret)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
from itertools import product


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

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

Submission status: Accepted

Solution code:
# A - Garden
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()) 
ans = (a-1)*(b-1)
print(ans)

Submission status: Accepted

Solution code:
#                         author:  kagemeka 
#                         created: 2019-11-09 15:46:24(JST)
### modules
## from standard library
import sys
# import collections
# import math
# import string
# import bisect
# import re
# import itertools
# import statistics
# import functools
# import operator
## from external libraries
# import scipy.special   
# import scipy.misc      
# import numpy as np 

def main():
    a, b = (int(x) for x in sys.stdin.readline().split())
    area = a * b - (a + b - 1)
    print(area)



if __name__ == "__main__":
    # execute only if run as a script
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

A, B = two_int()
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,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())
a,b = a-1, b-1
print(a*b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
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())
# N = int(input())
print(A * B - (A + B - 1))

Submission status: Accepted

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

Submission status: Accepted

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


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*B-(A*1+B*1)+1)

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

N,M = map(int,input().split(' '))
print(N*M-N-M+1)

Submission status: Accepted

Solution code:
#106a
A,B = map(int, input().split()) # N:500

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:
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())
c = a*b
d = a+b-1
print(c-d)

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

Submission status: Accepted

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

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 = list(map(int,input().split()))
A=a[0]
B=a[1]
print(A*B-(B+A-1))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
area = a * b
print(area - 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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

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

Submission status: Accepted

Solution code:
'''A - Garden
https://atcoder.jp/contests/abc106/tasks/abc106_a

>>> main(2, 2)
1
>>> main(5, 7)
24'''


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


if __name__ == "__main__":
    a, b = map(int, input().split(' '))
    main(a, b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = list(map(int, input().split()))
print((X[0]-1)*(X[1]-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 = (int(x) for x in input().split())

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

field = A*B
road = A+B-1

print(field-road)

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())
field=A*B-A-B+1
print(field)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
print(int((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:
numberlist = [int(x) for x in input().split()]
print((numberlist[0]-1)*(numberlist[1]-1))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N, M = map(int,input().split())
print(N*M-(N+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 = 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:
# ABC0106 A - Garden
a,b = map(int,input().split())
print((a-1)*(b-1))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
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().split())
print(a*b-(a+b-1))

Submission status: Accepted

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

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*1-B*1+1*1)

Submission status: Accepted

Solution code:
import os, sys, re, math

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*1+b*1) + 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 = [int(c) for c in input().split()]
print (a * b - a - b + 1)

Submission status: Accepted

Solution code:
line = raw_input()
a, b = [int(s) for s in line.split(' ')]
print (a - 1) * (b - 1)

Submission status: Accepted

Solution code:
import os, sys, re, math

lines = sys.stdin.readlines()

(A, B) = [int(i) for i in lines[0].split()]

print (A * B - (A + 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,B=[int(s) for s 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:
#ABC106A
a,b = list(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 = 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 * B - A - B + 1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

a, b = na()
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 = [int(elem) for elem in input().split()]
print(A * B - A - B + 1)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

ab = list(map(int, input().split()))
ab = np.array(ab)

print((ab[0]-1)*(ab[1]-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())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
a, b = map(int, input().split())
#道を全て端に寄せると、（a-1)*(b-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:
a, b = map(int, input().split())
if 2 <= a or b <= 100:
    print((a - 1) * (b - 1))
else:
    print('hoge!')

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())
S=(A-1)*(B-1)
print(S)

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
s = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

a, b = na()
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 = list(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:
print(eval("("+input().replace(" ","-1)*(")+"-1)"))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
import queue
from collections import Counter
from itertools import accumulate
from fractions import gcd
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)

mod = 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)]
"""

if __name__ == "__main__":
    A, B = map(int, sys.stdin.readline().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:
w,h=map(int,input().split())
print((w-1)*(h-1))

Submission status: Accepted

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

print(int((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 = (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-1)*(B-1))

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    print(solve())

Submission status: Accepted

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

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

print(C)

Submission status: Accepted

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

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    test()

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 math

# inputList=[]
# for i in range(6):
#     inputNum = input()
#     inputList.append(inputNum)
inputa = input().split()
# inputb = input().split()

# inputa = [int(n) for n in inputa]
# inputa.sort()

a = int(inputa[0])
b = int(inputa[1])
# c = int(inputa[2])

# x = int(inputb[0])
# y = int(inputb[1])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def main():


    N,K = map(int,input().split())

    print((N*K)-(N+K-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())
ans = (a*b-a-b+1)
print(ans)

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:

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from operator import itemgetter

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

print((n-1) * (i-1))

Submission status: Accepted

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

nA = a * b - (a + b) + 1

print(nA)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#106

A, B = map(int, input().rstrip().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
def main():
    a,b = map(int, input().split())

    base = a*b
    line = a + b -1

    print(int(base-line))


if __name__ == '__main__' :
    main()

Submission status: Accepted

Solution code:
#ABC107
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:
N = input().split()
A = int(N[0])
B = int(N[1])

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

Submission status: Accepted

Solution code:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


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

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    a, b = (int(_) for _ in input().split())  
    print((a-1)*(b-1))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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


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

Submission status: Accepted

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

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

# solve & output
print((A - 1) * (B - 1))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

# print(A)
# print(B)

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

Submission status: Accepted

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

print(field)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(a*b - (a+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:
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    a, b = map(int, input().split())

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

Submission status: Accepted

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

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