"use strict";

const Main = (input) => {
  	input = input.split("\n");
    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 j = 0; j <= hundred; j++) {
            for (let k = 0; k <= fifty; k++) {
                if(sum === k*50 + j * 100 + i * 500){
                    count++;
                }
            }
        }
    }

    console.log(count);



}

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