{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import           Control.Monad (guard)

main :: IO ()
main = do
  a <- readLn
  b <- readLn
  c <- readLn
  x <- readLn
  print $ solve a b c x

solve :: Int -> Int -> Int -> Int -> Int
solve a b c x = length $ do
  na <- [0 .. a]
  nb <- [0 .. b]
  nc <- [0 .. c]
  guard $ na * 500 + nb * 100 + nc * 50 == x
  return ()
