a,b=map(int,input().split()) c,d=map(int,input().split()) if a!=0: c=c-a if b!=0: d=d-b print((abs(c)+abs(d))/2)