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