n,m = (int(x) for x in input().split()) print(n*m-1)