using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Text.RegularExpressions; using System.Linq; class Magatro { static void Main() { string[] s = Console.ReadLine().Split(' '); string[] ss = Console.ReadLine().Split(' '); int max = Math.Max(int.Parse(s[0]), int.Parse(s[1])); if (s[0] == s[1] && ss[0] == ss[1]) { max++; } Console.WriteLine(max); } }