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

  val ans = {
    var cnt = 0
      for {
        i <- 0 to a takeWhile (_*500 <= x)
        c0 = 500*i
        j <- 0 to b takeWhile (c0 + _*100 <= x)
        c1 = 100*j
        k <- 0 to c
        if c0 + c1 + 50*k == x
      } cnt += 1
    cnt
  }

  println(ans)
}