# Enter your code here. Read input from STDIN. Print output to STDOUT c,r=map(int,raw_input().split(' ')) c_c=c-1 r_c=(r-1)*c print c_c+r_c