import java.util.*; import java.util.Map.Entry; import java.math.*; import java.awt.geom.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int xa = sc.nextInt(); int ya = sc.nextInt(); int xb = sc.nextInt(); int yb = sc.nextInt(); double yL = 0; double yR = 2000; while(yR - yL >= 0.0000000001) { double yPA = ((yL + yR) / 2.0 + yR) / 2.0; double disAPA = Math.sqrt(Math.pow(xa, 2) + Math.pow(ya - yPA, 2)); double disPBA = Math.sqrt(Math.pow(xb, 2) + Math.pow(yb - yPA, 2)); double DIS2 = disAPA + disPBA; double yPB = (yL + (yL + yR) / 2.0) / 2.0; double disAPB= Math.sqrt(Math.pow(xa, 2) + Math.pow(ya - yPB, 2)); double disPBB = Math.sqrt(Math.pow(xb, 2) + Math.pow(yb - yPB, 2)); double DIS3 = disAPB + disPBB; if(DIS2 < DIS3) { yL = (yL + yR) / 2.0; } else { yR = (yL + yR) / 2.0; } } System.out.printf("%.20f\n",(yL + yR) / 2.0); } }