'use strict';

function main(inputs) {
  let numbers = inputs.split('\n').map(num => parseInt(num, 10));
  let count = 0;
  for (let i = 0; i <= numbers[0]; i++) {
    for (let j = 0; j <= numbers[1]; j++) {
      for (let k = 0; k <= numbers[2]; k++) {
        if (i * 500 + j * 100 + k * 50 === numbers[3]) {
          count++;
        }
      }
    }
  }
  console.log(count);
}

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