fun main(args: Array<String>) {
    val A = readLine()!!.toInt()
    val B = readLine()!!.toInt()
    val C = readLine()!!.toInt()
    val X = readLine()!!.toInt()
    var pattern = 0
    for (a in 0..A) {
        for (b in 0..B) {
            for (c in 0..C) {
                val total = 500*a + 100*b + 50*c
                if (total == X) pattern++
            }
        }
    }
    println(pattern)
}