main :: IO () main = getContents >>= print . compute . map read . words compute [a,b,x,y] = (abs (a-x) + abs (b-y)) / 2