f :: String->Int
f x=read x::Int
     
main = do
        e1 <- getLine
        e2 <- getLine
        e3 <- getLine
        e4 <- getLine
        let a=f e1
            b=f e2
            c=f e3
            x=f e4
        putStrLn $ show $ length $ filter (==x) [a1*500+b1*100+c1*50|a1<-[0..a],b1<-[0..b],c1<-[0..c]]