fun main (args: Array<String>) {
	val A = readLine()
	val B = readLine()
	val C = readLine()
	val X = readLine()
	
	val coin1 : Int = A!!.toInt()
	val coin2 : Int = B!!.toInt()
	val coin3 : Int = C!!.toInt()
	val money : Int = X!!.toInt()
	
	var num1 : Int = 0
	var num2 : Int = 0
	var num3 : Int = 0
	var total : Int = 0
	var count : Int = 0
	
	for (h in 0..coin1) {
		
		num1 = 500 * h
		total = num1
		
		if (total == money) {
			count++
			break
		}
		
		for (i in 0..coin2) {
			
			num2 = 100 * i
			total = num1 + num2
			
			if (total == money) {
				count++
				break
			}
			
			for (j in 0..coin3) {
				
				num3 = 50 * j
				total = num1 + num2 + num3
				
				if (total == money) {
					count++
					break
				}
				
			}
			
		}
		
	}
	
	println("${count}")
	
}