



import collections





def solve():



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

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





if __name__ == "__main__":

    solve()

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



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

import collections


def solve():
    A, B = list(map(int, input().split()))
    print((A * B - (A + B - 1)))


if __name__ == "__main__":
    solve()

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

-import collections - - -def solve(): -    A, B = list(map(int, input().split())) -    print((A * B - (A + B - 1))) - - -if __name__ == "__main__": -    solve() +A, B = list(map(int, input().split())) +print(((A - 1) * (B - 1)))