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