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