import scala.io.StdIn

object Main {
  def main(args: Array[String]) = {
    val a = StdIn.readInt
    val b = StdIn.readInt
    val c = StdIn.readInt
    val x = StdIn.readInt
    var count = 0;
    for(i <- 0 to a; j <- 0 to b; k <- 0 to c){
      if(i * 500 + j * 100 + k *50 == x) count += 1
    }
    println(count)
  }
}