{-# LANGUAGE ScopedTypeVariables, LambdaCase #-}

import qualified Data.List as List
import qualified Data.Set as Set

main :: IO ()
main = do
    [a, b, c, x] :: [Int] <- map read . words <$> getContents
    print $ length [(an, bn, cn) | an <- [0..a], bn <- [0..b], cn <- [0..c], 500 * an + 100 * bn + 50 * cn == x]