let a = stdin.ReadLine() |> int
let b = stdin.ReadLine() |> int
let c = stdin.ReadLine() |> int
let x = stdin.ReadLine() |> int
let divCnt = x / 50

[for i in [0..a] do
    for j in [0..b] do
        for k in [0..c] do
            yield i * 500 + j * 100 + k * 50]
            |> List.sumBy (fun t -> if t = x then 1 else 0)
            |> printfn "%d"
