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

  val ans = {
      for {
        i <- 0 to a
        if coin(0)*i <= x
        j <- 0 to b
        if coin(0)*i + coin(1)*j <= x
        k <- 0 to c
        if coin(0)*i + coin(1)*j + coin(2)*k == x
      } yield  true
    }.size

  println(ans)
}