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