
solve :: Int -> Int -> Int -> Int -> Int
solve a b c x = length . filter (== x) $ [ tot i j k | i <- [0..a], j <- [0..b], k <- [0..c]]
    where tot i j k = 500 * i + 100 * j + 50 * k

main = do
    a <- readLn :: IO Int
    b <- readLn :: IO Int
    c <- readLn :: IO Int
    x <- readLn :: IO Int
    print $ solve a b c x 