fun main(args: Array<String>) {
    abc087b()
}

fun abc087b() {
    val (a, b, c, x) = (1..4).map { readLine()!!.toInt() }

    val answer = (0..a).map { y500 ->
        (0..b).map { y100 ->
            (0..c).map { y50 ->
                y500 * 500 + y100 * 100 + y50 * 50 == x
            }
        }.flatten()
    }.flatten().count { it }

    println(answer)
}
