p=list(map(int,input().split())) q=list(map(int,input().split())) m=[(p[0]+q[0])/2, (p[1]+q[1])/2] print(abs(p[0]-m[0])+abs(p[1]-m[1]))