{-# LANGUAGE BangPatterns #-}
import Data.List
import Data.Bits
import qualified Data.ByteString.Char8 as BS

readInt s = case BS.readInt s of
              Just (x, _) -> x

solveNaive :: Int -> Int -> Int -> Int -> Int
solveNaive !a !b !c !x
  | 500 * a + 100 * b + 50 * c < x = 0
  | c == 0 && x `rem` 100 /= 50 = 0
  | otherwise = sum [ 1
                    | na <- [0..a]
                    , nb <- [0..b]
                    , nc <- [0..c]
                    , 500 * na + 100 * nb + 50 * nc == x
                    ]

main = do
  a <- readInt <$> BS.getLine
  b <- readInt <$> BS.getLine
  c <- readInt <$> BS.getLine
  x <- readInt <$> BS.getLine
  print $ solveNaive a b c x
