N, M = list(map(int, input().split())) print(N*M - 1)