main = do [px,py,qx,qy] <- map read . words <$> getContents print $ (abs (px-qx) + abs (py-qy)) / 2