s=require("fs").readFileSync("/dev/stdin","utf8").split('\n').map(n=>n|0)
c=0;
[...Array(s[0]+1)].map((_,i)=>
[...Array(s[1]+1)].map((_,j)=>
[...Array(s[2]+1)].map((_,k)=>
i*500+j*100+k*50==s[3]&&c++)))
console.log(c)
