inp = input().split() n = int(inp[0]) m = int(inp[1]) print(n*m-1)