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