fun main(args:Array<String>) {
    val (n,x) = readLine()!!.split(" ").map { it.toInt() }
    val list = readLine()!!.split(" ").map { it.toInt() }

    var pos = 0
    for(i in (0..list.size)) {
        if(i == 0) {
            continue
        }
        val newPos = pos + list[i-1]
        if(newPos > x) {
            println(i)
            return
        }
        pos = newPos
    }
    println(n + 1)
}
