using System; namespace No306 { class MainClass { public static void Main (string[] args) { var f = Console.ReadLine ().Split(' '); var s = Console.ReadLine ().Split(' '); var fx = Convert.ToDouble (f [0]); var fy = Convert.ToDouble (f [1]); var sx = - Convert.ToDouble (s [0]); var sy = Convert.ToDouble (s [1]); var dx = fx - sx; if (dx == 0) { Console.WriteLine (fy.ToString ()); return; } var leftx = sx; var lefty = sy; var rightx = fx; var righty = fy; var midx = (leftx + rightx) / 2d; var midy = (lefty + righty) / 2d; while (Math.Abs(midx) > 1e-16) { midx = (leftx + rightx) / 2d; midy = (lefty + righty) / 2d; if (midx < 0) { leftx = midx; lefty = midy; } else if (midx > 0) { rightx = midx; righty = midy; } } Console.WriteLine (midy.ToString ()); } } }