using System; using System.Collections.Generic; using System.IO; class Solution { static void Main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */ string [] input = Console.ReadLine().Split(' '); long n = Convert.ToInt64(input[0]) - 1; long m = Convert.ToInt64(input[1]) - 1; long result = n + m + n*m ; Console.WriteLine(result); } }