import scala.io.{StdIn => in}
import scala.collection.{mutable => mu}

object Main extends App {
  val Array(n, x) = in.readLine.split(" ").map(_.toInt)
  val li = in.readLine.split(" ").map(_.toInt)
  val table = Array.ofDim[Int](n+1)
  for(i <- 0 until n) {
    table(i+1) = table(i) + li(i)
  }
  val ans = table.count(_ <= x)
  println(ans)
}