function main(input) {
    const ALL = input.split('\n').map((n)=>parseInt(n, 10));

    let count = 0;

    for(a=0;a<=ALL[0];a++){
        for(b=0;b<=ALL[1];b++){
            for(c=0;c<=ALL[2];c++){
                let sum = (a*500)+(b*100)+(c*50);
                if(sum===ALL[3])count++;
            }
        }
    }
    console.log(count);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));