module Main where--

valid i j k x = 500 * i + 100 * j + 50 * k == x

main :: IO ()
main = do
        a <- readLn
        b <- readLn
        c <- readLn
        x <- readLn
        putStrLn $ show $ length [(i, j, k) | i <- [0 .. a],
                           j <- [0 .. b],
                           k <- [0 .. c],
                           valid i j k x]
