import java.util.*; import java.math.*; class Question410 { public static void main(String[] str){ Scanner scan = new Scanner(System.in); double px = scan.nextDouble(), py = scan.nextDouble(); double qx = scan.nextDouble(), qy = scan.nextDouble(); if(px == qx) System.out.println((Math.abs(py)+Math.abs(qy))/2); else if(py == qy) System.out.println((Math.abs(px)+Math.abs(qx))/2); else System.out.println((Math.abs(px)+Math.abs(py)+Math.abs(qx)+Math.abs(qy))/2); } }