main = do
    a <- read <$> getLine
    b <- read <$> getLine
    c <- read <$> getLine
    x <- read <$> getLine
    print $ solve a b c x

{-金額を忘れてとにかく可能な支払い方法を列挙する→金額が正しいものを数える-}
solve :: Int -> Int -> Int -> Int -> Int
solve a b c x = length $ filter (x==) [ 500*a' + 100*b' + 50*c' | a'<-[0..a], b'<-[0..b], c'<-[0..c] ]