"use strict";
function main(input){
    const lines = input.split('\n');
    const a = parseInt(lines[0],10);
    const b = parseInt(lines[1],10);
    const c = parseInt(lines[2],10);
    const sum = parseInt(lines[3],10);
    let count = 0;
    
    
    for(let aCount = 0; aCount <= a; aCount++){
        for(let bCount = 0; bCount <= b; bCount++){
            for(let cCount = 0; cCount <= c; cCount++){
                if((500*aCount) + (100*bCount) + (50*cCount) === sum){
                    count++;
                }
            }
        }
    }
    console.log(count);
}
 
main(require("fs").readFileSync("/dev/stdin", "utf8"));