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 count = 0L
    var i = 0
    while (count <= X && i < N) {
      count += L(i)
      i += 1
    }
    println(i)
  }

}

