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