'use strict'

function main(input) {
  input = input
    .trim()
    .split('\n')
    .map(v => Number(v)) 

  // 500, 100, 50
  const A = input[0]
  const B = input[1]
  const C = input[2]
  const X = input[3]

  let count = 0

  // const [A, B, C, X] = input
  // for (let ai = 0; ai <= A; ai++) {
  //   for (let bi = 0; bi <= B; bi++) {
  //     for (let ci = 0; ci <= C; ci++) {
  //       if (ai * 500 + bi * 100 + ci * 50 === X) count++
  //     }
  //   }
  // }
  const rec = (a, b, c) => {
    if (a * 500 + b * 100 + c * 50 === X) count++
    if (a + 1 <= A) rec(a + 1, b, c)
    if (b + 1 <= B) rec(a, b + 1, c)
    if (c + 1 <= C) rec(a, b, c + 1)
  }
  rec(0, 0, 0)

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