using System; using System.Collections.Generic; using System.Linq; namespace yukicoder { public class Program { public static void Main() { var a = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); var b = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); if (a[0] == a[1]&& b[0] == b[1]) { Console.WriteLine(a[0] + 2); } else { Console.WriteLine(Math.Max(a[0], a[1])); } } } }