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