object Main {

  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)

    val N, X = sc.nextInt()
    val L = Array.fill(N)(sc.nextInt())
    var D = 0L
    var i = 1
    while (D <= X && i < N) {
      D += L(i)
      if (D <= X) {
        i += 1
      }
    }
    println(i)
  }

}

