object Main extends App {
  val a = readLine.toInt
  val b = readLine.toInt
  val c = readLine.toInt
  val x = readLine.toInt
  
  val seqA = (0 to a).toList
  val seqB = (0 to b).toList
  val seqC = (0 to c).toList
  
  val matched = for {
    aa <- seqA
    bb <- seqB
    cc <- seqC
    if 500 * aa + 100 * bb + 50 * cc == x
  } yield {
    (aa, bb, cc)
  }
  
  println(matched.length)
}