import java.util.Scanner; class no410{ public static void main(String[] args) { Scanner stdIn=new Scanner(System.in); double a,b,c,d,t; a=stdIn.nextDouble(); b=stdIn.nextDouble(); c=stdIn.nextDouble(); d=stdIn.nextDouble(); if(c-a<0) a-=c; else a=c-a; if(d-b<0) b-=d; else b=d-b; System.out.print((a+b)/2.); } }