open System
open System.Runtime.InteropServices

let read() = Console.ReadLine() |> int

let A = read()
let B = read()
let C = read()
let X = read()

let cnt = ref 0

for c500 in 0..A do 
    for c100 in 0..B do 
        for c50 in 0..C do 
            if 500*c500 + 100*c100 + 50*c50 = X then
                incr cnt

cnt.Value
|> printfn "%i"
