fun main(args: Array<String>) {
    val (N, X) = readLine()!!.split(" ").map(String::toInt)
    val L = readLine()!!.split(" ").map(String::toInt)

    val D = IntArray(N + 1)
    D[0] = 0
    var sum = 1
    for (i in 1..N) {
        D[i] = D[i - 1] + L[i - 1]
        if (D[i] <= X) {
            sum++
        }
    }
    println(sum)
}