a, b = list(map(int, input().split()))

print(((a-1)*(b-1)))

exit(0)
a,b = list(map(int, input().split()))

print(((a-1)*(b-1)))

a, b = list(map(int, input().split()))
print(((a - 1) * (b - 1)))
exit(0)

a, b = list(map(int, input().split()))
print(((a - 1) * (b - 1)))

-exit(0)