'use strict'

function main(s) {

  s = s.split('\n');
  const a = Number(s[0]);
  const b = Number(s[1]);
  const c = Number(s[2]);
  const x = Number(s[3]);
  let counter = 0;

  for (let i = 0; i <= a; i++) {
    for (let j = 0; j <= b; j++) {
      for (let k = 0; k <= c; k++) {
        const sum = (500 * i) + (100 * j) + (50 * k)
        if (sum === x) counter += 1;
      }
    }
  }

  console.log(counter);
}

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