x = list(input().split()) r = (int(x[0]) * int(x[1])) - 1 print(r)