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