fun main (args : Array<String>) {
    var a = readLine()!!.toInt()
    var b = readLine()!!.toInt()
    var c = readLine()!!.toInt()
    var x = readLine()!!.toInt()

    var cnt = 0

    for (i in 0 until a + 1)
        for (j in 0 until b + 1)
            for (k in 0 until c + 1)
                if (500 * i + 100 * j + 50 * k == x)
                    cnt += 1

    println("%d".format(cnt))
}