# Enter your code here. Read input from STDIN. Print output to STDOUT import sys n,m = map(int, sys.stdin.readlines()[0].split()) print n * m - 1