import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    //nextLineとnextを同時に使ったら死ぬ
    val sc = new Scanner(System.in)
    val n, x = sc.nextInt()
    val ls = Array
      .fill(n)(sc.nextInt())
      .scanLeft(0) { case (acc, l) => l + acc }
      .takeWhile(_ <= x)
      .length
    println(ls)
  }
  def debug(args: Any*): Unit = {
    Console.err.println(args.mkString(" "))
  }
}
