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