main :: IO ()
main = do
  [h1, w1] <- map read . words <$> getLine
  [h2, w2] <- map read . words <$> getLine
  print $ f h1 w1 h2 w2

f :: Int -> Int -> Int -> Int -> Int
f h1 w1 h2 w2 = h1*w1 - h2*w1 - w2*h1 + h2*w2