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