import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  [a,b,c,x] <- map (read::String->Int) . lines <$> getContents
  print $sum [1|s<-[0..a], t<-[0..b], u<-[0..c], 500*s+100*t+50*u==x]