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(); System.out.println((Math.abs(px)+Math.abs(py)+Math.abs(qx)+Math.abs(qy))/2); } }