import Control.Applicative

solve :: Int -> Int -> Int -> Int -> Int
solve row col h w = row * col - ((col * h) + (row - h) * w)

main :: IO ()
main = do
  [row, col] <- map read . words <$> getLine
  [h, w] <- map read . words <$> getLine
  putStrLn $ show (solve row col h w)
