start=[int(i) for i in input().split()]
end=[int(i) for i in input().split()]
dE=(((start[0]-end[0])**2)+((start[1]-end[1])**2))**0.5
Dx=0
Dy=0
for i in range(len(end)):
    if start[0]>end[0]:
        Dx=start[0]-end[0]
    else:
        Dx=end[0]-start[0]
    if start[1]>end[1]:
        Dy=start[1]-end[1]
    else:
        Dy=end[1]-start[1]
fin=0
dM=(Dx)+(Dy)
if  dM>dE:
    fin=dM-dE
else:
    fin=dE-dM
print(fin)