import java.util.*; import java.io.*; import java.math.*; public class No306 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int xa=sc.nextInt(), ya=sc.nextInt(),xb=sc.nextInt(), yb=sc.nextInt(); // double t = yb, b = ya; // double t = ya, b = yb; double t, b; if(ya > yb) { t = ya; b = yb; }else { t = yb; b = ya; } while(t-b > 0.000001) { double p0 = (t*2+b)/3; double p1 = (t+b*2)/3; if(search(xa,ya,xb,yb,p0) < search(xa,ya,xb,yb,p1)) { b = p1; }else { t = p0; } } if(search(xa,ya,xb,yb,t) < search(xa,ya,xb,yb,b)) { System.out.println(t); }else { System.out.println(b); } } public static double search(int xa, int ya, int xb, int yb, double p) { double a = Math.sqrt(Math.pow(xa, 2) + Math.pow(ya-p, 2)); double b = Math.sqrt(Math.pow(xb, 2) + Math.pow(yb-p, 2)); return a+b; } }