'use strict'
let Main = (input) => {
  let v = input.split('\n')
  let v1 = v[0], v2 = v[1], v3 = v[2], target = v[3]
  let store = []
  let cnt = 0
  for(let i=v1; i >= 0; i--){
    for(let j=v2; j >= 0; j--){
	  for(let k=v3; k >= 0; k--){

        if(target == sumUp(i, j, k)){
          let ijk = concat(i, j, k)
          if(store.indexOf(ijk) !== ijk){
            store.push()
            cnt++
          }
        }
      }
    }
  }
  
  console.log(cnt)
}

let sumUp = (a,b,c) => 500*a + 100*b + 50*c
let concat = (a,b,c) => a + '_' + b + '_' + c

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