n,m = input().strip().split(' ') n,m = [int(n),int(m)] print(m*n-1)