func main() {
  	let numberOfFiveHandredCoins = Int(readLine()!)!
  	let numberOfHandredCoins = Int(readLine()!)!
  	let numberOfFiftyCoins = Int(readLine()!)!
	let amount = Int(readLine()!)!
  
  	var hitCount = 0
  	
  	for fHNum in 0...numberOfFiveHandredCoins {
      	if amount == fHNum * 500 {
	      	hitCount += 1
          	continue
        }
      
      	for hNum in 0...numberOfHandredCoins {
        	if amount == fHNum * 500 + hNum * 100 {
              	hitCount += 1
              	continue
            }
          
          	for fNum in 0...numberOfFiftyCoins {
              	if amount == fHNum * 500 + hNum * 100 + fNum * 50 {
                  	hitCount += 1
                  	continue
                }
            }
        }
    }
  	print(hitCount)
}

main()