object Main extends App {

  val Array(n, x) = scala.io.StdIn.readLine().split(" ").map(_.toInt)
  val lArr = scala.io.StdIn.readLine().split(" ").map(_.toInt)


  def solve() = {
    val dArr = Array.fill(n+1)(0)
    for(i <- 1 to n) {
      dArr(i) = dArr(i-1) + lArr(i-1)
    }
    dArr.count(_ <= x)
  }

  println(solve)

}
