"use strict";

/**
 * @see https://practice.contest.atcoder.jp/tasks/practice_1
 * @param  {string} input
 * @returns {string}
 */
var main = function(input) {
    const params = input.split("\n").map(x => parseInt(x));
    const A = params[0];
    const B = params[1];
    const C = params[2];
    const X = params[3];
    
    let patterns = 0;
    for (let a = 0; a <= A; a++) {
        for (let b = 0; b <= B; b++) {
            for (let c = 0; c <= C; c++) {
                const total = (500 * a) + (100 * b) + (50 * c);
                if (X === total) {
                    patterns++;
                }
            }
        }
    }
    return patterns;
};

const output = main(require("fs").readFileSync("/dev/stdin", "utf8"));
console.log(output); // console.log outputs with trailing new line!
