fun main(args: Array<String>) {
    val (N, X) = readLine()!!.split(" ").map(String::toInt)
    val L = readLine()!!.split(" ").map(String::toInt)
    var d = 0
    var ans = 1
    for (l in L) {
        d += l
        if (d > X) break
        ans++
    }
    println(ans)
}