function Main(input) {
  var args = input.split('\n');
  var coin500 = parseInt(args[0], 10);
  var coin100 = parseInt(args[1], 10);
  var coin50 = parseInt(args[2], 10);
  var coinTotal = parseInt(args[3], 10);
  var pat = 0;
  for(var i = 0; i <= coin500; i++){
    for(var j = 0; j <= coin100; j++){
      for(var k = 0; k <= coin50; k++){
        if((500 * i + 100 * j + 50 * k) === coinTotal) pat++;
      }
    }
  }
  console.log(pat);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));