import scala.io.{StdIn => in}

object Main extends App {
  val a = in.readInt
  val b = in.readInt
  val c = in.readInt
  val x = in.readInt

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

  val ans = res
  println(ans)
}