import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); double ax = sc.nextDouble(); double ay = sc.nextDouble(); double bx = sc.nextDouble(); double by = sc.nextDouble(); if(ax == bx && ay == by)System.out.println("0"); else if(ax == bx)System.out.println((Math.abs(ay)+Math.abs(by))/2); else if(ay == by)System.out.println((Math.abs(ax)+Math.abs(bx))/2); else System.out.println((Math.abs(ax)+Math.abs(ay)+Math.abs(bx)+Math.abs(by))/2); } }