private fun readInts() = readLine()!!.split(" ").map { it.toInt() }

fun main(args: Array<String>) {
    val (A) = readInts()
    val (B) = readInts()
    val (C) = readInts()
    val (X) = readInts()

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

    println(ans)
}