import Control.Applicative main :: IO() main = do [px, py, qx, qy] <- map read . concat . map words . lines <$> getContents print $ (abs (px - py) + abs (qx - qy)) / 2