"use strict"

const main =(input)=>{
const Array=input.split("\n").map((n)=>parseInt(n,10))
const a= Array[0]
const b= Array[1]
const c= Array[2]
const x= Array[3]
let result = 0;

for(let i=0;i<=a;i++)for(let j=0;j<=b;j++)for(let k=0;k<=c;k++){
  if(500*i+100*j+50*k==x) result ++;
}
console.log(result);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))