fun main(args: Array<String>) {
    val readInt = { readLine()!!.toInt() }
    val ai = readInt()
    val bi = readInt()
    val ci = readInt()
    val x = readInt()
    var count = 0
    for (a in 0..ai) {
        for (b in 0..bi) {
            for (c in 0..ci) {
                val sum = a * 500 + b * 100 + c * 50
                if (sum == x) count++
            }
        }
    }
    print(count)
}