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