import qualified Data.ByteString.Char8 as B
import Data.Maybe

main :: IO ()
main = do
  [a, b, c, x] <- map (fst . fromJust . B.readInt) . B.words <$> B.getContents
  print $ length $ filter (== x) $ total <$> [0..a] <*> [0..b] <*> [0..c]
    where total u v w = 500*u + 100*v + 50*w