object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val A, B, C, X = sc.nextInt()
  val matched = for {
    a <- 0 to A
    b <- 0 to B
    c <- 0 to C
    if a * 500 + b * 100 + c * 50 == X
  } yield ()
  println(matched.length)
}
