using System; using System.Collections.Generic; using System.IO; class Solution { static void Main(String[] args) { string[] tokens_n = Console.ReadLine().Split(' '); int n = Convert.ToInt32(tokens_n[0]); int k = Convert.ToInt32(tokens_n[1]); int l; int s; if (n>k){ l=n; s=k; } else { l = k; s = n; } l--; s--; long res = (long)s + ((long)s+1)*(long)l; Console.WriteLine(res); } }