fun main(args : Array<String>) {
    val (N, X) = readLine()!!.split(" ").map { it.toLong() }
    val L = readLine()!!.split(" ").map { it.toLong() }
    val D = LongArray(N.toInt() +1)
    D[0] = 0

    var count = 1L
    (1..N.toInt()).forEach {
        D[it] = D[it - 1] + L[it - 1]
        if (D[it] <= X) {
            count++
        }
    }

    println(count)
}