# Enter your code here. Read input from STDIN. Print output to STDOUT n, m = gets.split(" ").map(&:to_i) p (n * m) - 1