import sys



# 関数 solve は，もちろん，問題に応じて書き換える

def solve(a, b):

    s=int(a)-1

    r=int(b)-1

    return s*r



# ここから下は，入力・出力形式が同じであれば，変えなくて良い．

def readQuestion():

    line = sys.stdin.readline().rstrip()

    [str_a, str_b] = line.split(' ')

    return (int(str_a), int(str_b))



def main():

    a, b = readQuestion()

    answer = solve(a, b)

    print(answer)

    

if __name__ == '__main__':

    main()
import sys



def solve(a, b):

    # Uncomment the following if you want to check the input.

    # print('a =', a)

    # print('b =', b)

    s=int(a)-1

    r=int(b)-1

    return s*r





def readQuestion():

    ws = sys.stdin.readline().strip().split()

    a = int(ws[0])

    b = int(ws[1])

    return (a, b)



def main():

    print((solve(*readQuestion())))



# Uncomment before submission

main()
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a, b):
    s = int(a) - 1
    r = int(b) - 1
    return s * r


# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(" ")
    return (int(str_a), int(str_b))


def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)


if __name__ == "__main__":
    main()

import sys


def solve(a, b):
    # Uncomment the following if you want to check the input.
    # print('a =', a)
    # print('b =', b)
    s = int(a) - 1
    r = int(b) - 1
    return s * r


def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    return (a, b)


def main():
    print((solve(*readQuestion())))


# Uncomment before submission
main()

-# 関数 solve は，もちろん，問題に応じて書き換える + +    # Uncomment the following if you want to check the input. +    # print('a =', a) +    # print('b =', b) -# ここから下は，入力・出力形式が同じであれば，変えなくて良い． -    line = sys.stdin.readline().rstrip() -    [str_a, str_b] = line.split(" ") -    return (int(str_a), int(str_b)) +    ws = sys.stdin.readline().strip().split() +    a = int(ws[0]) +    b = int(ws[1]) +    return (a, b) -    a, b = readQuestion() -    answer = solve(a, b) -    print(answer) +    print((solve(*readQuestion()))) -if __name__ == "__main__": -    main() +# Uncomment before submission +main()