import io.StdIn.readInt
object Main extends App {
    val a = readInt
    val b = readInt
    val c = readInt
    val x = readInt

    var count = 0
    for (count_a <- 0 to a; count_b <- 0 to b; count_c <- 0 to c)
        if (500*count_a+100*count_b+50*count_c == x) count += 1

    println(count)
}