class Program { static void Main(string[] args) { string[] topNum = Console.ReadLine()!.Split(' '); string[] bottomNum = Console.ReadLine()!.Split(' '); double topX = double.Parse(topNum[0]); double topY = double.Parse(topNum[1]); double bottomX = double.Parse(bottomNum[0]); double bottomY = double.Parse(bottomNum[1]); double xSum = CalcFunc(topX, bottomX); double ySum = CalcFunc(topY, bottomY); xSum /= 2; ySum /= 2; Console.WriteLine(xSum + ySum); } public static double CalcFunc(double top, double bottom) { if (top < bottom) { double tmp = top; top = bottom; bottom = tmp; } return top - bottom; } }