object Main extends App {
  val Array(a, b, c, x) = Iterator.continually(io.StdIn.readLine.toInt)
    .take(4).toArray

  val ans = {
    for {
      i <- 0 to a
      c500 = 500*i
      if c500 <= x
      j <- 0 to b
      c100 = 100*j
      if c500 + c100 <= x
      k <- 0 to c
      if c500 + c100 + 50*k == x
    } yield true
  }.size

  println(ans)
}