class Program { static void Main(string[] args) { string[] input = Console.ReadLine()!.Split(' '); int left = int.Parse(input[0]); int right = int.Parse(input[1]); if (left < right) { int tmp = left; left = right; right = tmp; } int count = 0; while (right > 0) { left--; right--; count += 2; } if (left == right) { Console.WriteLine(count - 1); } else { Console.WriteLine(count); } } }