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

sol :: Int -> Int -> Int -> Int -> Int
sol a b c x
  = sum [f b c (x-500*a') | a' <- [0..a]]

-- # of ways to pay y yen by b 100 yen and c 50 yen.
f b c y = sum [g c (y-100*b') | b' <- [0..b]]

-- # of ways to pay z yen with c 50 yen.
g c z
  | z >= 0 && 50*c >= z = 1 
  | otherwise           = 0