using System; class King { static void Main(String[] args) { String[] vals; int x,y,x2,y2; vals = Console.ReadLine().Split(' '); x = int.Parse(vals[0]); y = int.Parse(vals[1]); vals = Console.ReadLine().Split(' '); x2 = int.Parse(vals[0]); y2 = int.Parse(vals[1]); int steps = Math.Max(Math.Abs(x), Math.Abs(y)); if(Math.Abs(x) == Math.Abs(y) && Math.Abs(x2) == Math.Abs(y2)) steps++; Console.WriteLine(steps); } }