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