object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val a, b, c = sc.nextInt()
  val x = sc.nextInt() / 50
  var ans = 0
  for {
    i <- 0 to a
    j <- 0 to b
    k <- 0 to c
    if i * 10 + j * 2 + k == x
  } {
    ans += 1
  }
  println(ans)
}
