
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 arr = Array.fill(n)(0)
    for(i <- 1 until n) {
      arr(i) = arr(i-1) + lArr(i-1)
    }
    arr.count(_ <= x)
  }

  println(solve)

}
