function main(input) {
  const nums = input.split('\n')
  let count = 0

  for (let i = 0; i < nums[0]; i ++) {
    for (let j = 0; i < nums[1]; j ++) {
      for (let k = 0; i < nums[2]; k ++) {
        if (500 * i + 100 * j + 50 * k === nums[3]) {
          count ++
        }
      }
    }
  }

  console.log(count)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))
