n, m = map(int,input().strip().split()) print(str(n*m-1))