function Main(input) {
  const A = input.split('\n')[0];
  const B = input.split('\n')[1];
  const C = input.split('\n')[2];
  const X = input.split('\n')[3];
  
  var count = 0;
  
  for (var i =0; i <= A; i++) {
    for (var j =0; j <= B; j++) {
      for (var k =0; k <= C; k++){
        var total = 500 * i + 100 * j + 50 * k;
        if (total == X) {
          count ++;
        }
      }
    }
  }
console.log(count);
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));
