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

  var count = 0
  for (numA <- 0 to a; numB <- 0 to b; numC <- 0 to c) {
    if (x - (numA * 500 + numB * 100 + numC * 50) == 0) count += 1
  }

  println(count)
}