import scala.util.control.Breaks._

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val line = Seq.fill(2)(sc.nextInt)
    val (n, x) = (line(0), line(1))
    val ls = Seq.fill(n)(sc.nextInt)

    var y = 0
    var count = 1
    breakable {
      for (l <- ls) {
        y += l
        if (y > x) {
          break
        }
        count += 1
      }
    }
    println(count)
  }
}