'use strict'

function Main(input) {
  const inputList = input.split('\n');
  const fiveHundread = inputList[0]
  const oneHundread = inputList[1]
  const fifty = inputList[2]
  const sum = Number(inputList[3])
  let count = 0;

  let tmpTotal = 0;

  for (let i=0; i<=fiveHundread; i++) {
    tmpTotal = 500 * i
    if (tmpTotal > sum) {
      break
    } else if (tmpTotal === sum) {
      count ++
      break
    }
    for (let j=0; j<=oneHundread; j++) {
      tmpTotal = 500 * i + 100 * j 
      if (tmpTotal > sum) {
        break
      } else if (tmpTotal === sum) {
        count ++
        break
      }
      for (let k=0; k<=fifty; k++) {
        tmpTotal = 500 * i + 100 * j + 50 * k
        if (tmpTotal > sum) {
          break
        } else if (tmpTotal === sum) {
          count++
          break
        }
      }
    }
  }

  console.log(count)
}

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