import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextLong()
    val x = sc.next().toLong()
    val l = (0 until n).map { sc.next().toLong() }
    println(problem130b(n, x, l))
}

fun problem130b(n: Long, x: Long, l: List<Long>): Int {
    var d = 1L
    var count = 1
    (1..n.toInt()).forEach { i ->
        d = (d - 1) + l[i - 1]
        if (d <= x) {
            count++
        }
        d++
    }
    return count
}
