a, b = [int(n) for n in input().split()] print(a*b-1)