function main(input) {

    const num500   = parseInt(input.split('\n')[0],10);
    const num100   = parseInt(input.split('\n')[1],10);
    const num50    = parseInt(input.split('\n')[2],10);
    const totalYen = parseInt(input.split('\n')[0],10);

    let counter = 0;

    for (let i500 = 0; i500 < num500; i500++) {
        for (let i100 = 0; i100 < num100; i100++) {
            for (let i50 = 0; i50 < num50; i50++) {
                let expextedYen = (500*i500) + (100*i100) + (50*i50);
                if(expextedYen === totalYen) {
                    counter++;
                }
            }
        }
    }
    console.log(counter);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
