import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); int xa = sc.nextInt(); int ya = sc.nextInt(); int xb = sc.nextInt(); int yb = sc.nextInt(); double left = 0; double right = 1000; for (int i = 0; i < 1000000; i++) { double m1 = (left * 2 + right) / 3; double m2 = (left + right * 2) / 3; double d1 = Math.sqrt(Math.pow(xa, 2) + Math.pow(ya - m1, 2)) + Math.sqrt(Math.pow(xb, 2) + Math.pow(yb - m1, 2)); double d2 = Math.sqrt(Math.pow(xa, 2) + Math.pow(ya - m2, 2)) + Math.sqrt(Math.pow(xb, 2) + Math.pow(yb - m2, 2)); if (d1 < d2) { right = m2; } else { left = m1; } } System.out.println(left); } } class Scanner { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(""); public Scanner() throws Exception { } public int nextInt() throws Exception { return Integer.parseInt(next()); } public long nextLong() throws Exception { return Long.parseLong(next()); } public double nextDouble() throws Exception { return Double.parseDouble(next()); } public String next() throws Exception { while (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return st.nextToken(); } }