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

