import scala.io.StdIn
object Main extends App {
  val A = StdIn.readLine().toInt
  val B = StdIn.readLine().toInt
  val C = StdIn.readLine().toInt
  val X = StdIn.readLine().toInt

  val answer = for {
    a <- 0 to A
    b <- 0 to B
    c <- 0 to C
    if (500 * a + 100 * b + 50 * c == X)
  } yield (a, b, c)
  println(answer.length)
}
