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

var cnt = 0
for (i <- 0 to a) {
    for (j <- 0 to b){
        for (k <- 0 to c){
           if (x==500*i+100*j+50*k) cnt += 1
        }
    }
}

println(cnt)
}