fun main(args: Array<String>) {
	val A = readLine()!!.toInt()
	val B = readLine()!!.toInt()
	val C = readLine()!!.toInt()
	val X = readLine()!!.toInt()
	var cnt = 0

	for (a in 0 .. A) {
		for (b in 0 .. B) {
			for (c in 0 .. C) {
				if (500 * a + 100 * b + 50 * c == X) {
					cnt += 1
				}
			}
		}
	}
	println(cnt)
}