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 */ var line1 = Console.ReadLine().Split(' '); var n = Convert.ToUInt64(line1[0]); var m = Convert.ToUInt64(line1[1]); var ans = (n - 1) + n * (m - 1); Console.WriteLine(ans); } }