toInt :: String -> Int
toInt = read :: String -> Int

main = do
  a <- toInt <$> getLine
  b <- toInt <$> getLine
  c <- toInt <$> getLine
  x <- toInt <$> getLine
  print $ length [(s, t, u) | s <- [0..a], t <- [0..b], u <- [0..c], 500*s+100*t+50*u == x]
