function main(input) {
    var input = input.split('\n')
    var num500 = input[0]
    var num100 = input[1]
    var num50 = input[2]
    var x = input[3]
    var counter = 0

    for(i=0; i<=num500;i++){
        for(j=0; j<=num100; j++){
            for(k=0; k<=num50;k++){
                var sum = (i*500+j*100+k*50)
                if(sum == x){
                   counter +=1
                }
            }
        }
    }
    console.log(counter)
}

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