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

    var cnt = 0
    for (n500 in 0..a) {
        for (n100 in 0..b) {
            for (n50 in 0..c) {
                if (x == n500 * 500 + n100 * 100 + n50 * 50) {
                    cnt++
                }
            }
        }
    }
    print(cnt)
}
