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