process.stdin.resume();
process.stdin.setEncoding('utf8');
// Your code here!

function main(input) {
    var arg = input.split('\n').map((n) => parseInt(n));
    var ans = 0
    for (var f = 0; f <= arg[0]; f++){
        for (var h = 0; h <= arg[1]; h++){
            for(var o = 0; o <= arg[2]; o++){
                if (500 * f + 100 * h + 50 * o === arg[3]){
                    ans += 1;
                }
            }
        }
    }
    console.log(ans);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));