import Control.Applicative

main :: IO ()
main = do
   [a, b] <- map read . words <$> getLine
   [c, d] <- map read . words <$> getLine
   putStrLn $ show (solve a b c d)
   
solve :: Int -> Int -> Int -> Int -> Int
solve a b c d = a * b - c * b - d * a + c * d