# Enter your code here. Read input from STDIN. Print output to STDOUT m,n = map(int, raw_input().split()) print m*n -1