import Control.Monad

main = do
  [a,b,c,d] <- replicateM 4 readLn :: IO [Int]
  print $ (length . filter (== d) . map (\(x,y,z) -> x * 500 + y * 100 + z * 50)) [(x,y,z) | x <- [0..a], y <- [0..b], z <- [0..c]]
