main = do
  a <- readLn
  b <- readLn
  c <- readLn
  d <- readLn
  let as = zipWith (*) [0..a] [500, 500..]
  let bs = zipWith (*) [0..b] [100, 100..]
  let cs = zipWith (*) [0..c] [50, 50..]
  print $ length $ filter (d == ) [ (x + y + z) | x <- as, y <- bs, z <- cs ]