import scala.io.{StdIn => in}

object Main extends App {
  val Array(n, x) = in.readLine.split(" ").map(_.toInt)

  val li = in.readLine.split(" ").map(_.toInt)

  val d = Array.ofDim[Int](n+1)
  for(i <- 1 to n) {
    d(i) = d(i-1) + li(i-1)
  }

  val ans = d.count(_ <= x)
  println(ans)
}