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
        if 500*i <= x
        j <- 0 to b
        if 500*i + 100*j <= x
        k <- 0 to c
        if 500*i + 100*j + 50*k == x
      } {cnt += 1}
    cnt
  }

  println(ans)
}