fun main(args: Array<String>) {
    val a = readLine()!!.toInt()
    val b = readLine()!!.toInt()
    val c = readLine()!!.toInt()
    val x = readLine()!!.toInt()
    var ans = 0
    (0..Math.min(a, x / 500)).forEach {
        val y = x - 500 * it
        (0..Math.min(b, y / 100)).forEach {
            val z = y - 100 * it
            if (z / 50 <= c) ans++
        }
    }
    println(ans)
}
