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[] token = Console.ReadLine().Split(' '); int n = Convert.ToInt32(token[0]); int m = Convert.ToInt32(token[1]); int count = 0; if(m 1) { m = m + 1; for (int i = 1; i < n + 1; i++) { while (m != 0) { m = m - 1; count++; } } } } else { count = m - 1; if (n > 1) { n = n + 1; for (int i = 1; i < m + 1; i++) { while (n != 0) { n = n - 1; count++; } } } } Console.WriteLine(count); } }