"use strict";

const Main = (input) => {
    var five_h = parseInt(input[0]);
    var hundred = parseInt(input[1]);
    var fifty = parseInt(input[2]);
    var sum = parseInt(input[3]);
    var count = 0;

    for (let i = 0; i < five_h; i++) {
        for (let i = 0; i < hundred; i++) {
            for (let i = 0; i < fifty; i++) {
                if(sum === fifty*50 + hundred * 100 + five_h * 500){
                    count++;
                }
            }
        }
    }

    console.log(count);



}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
