import java.io.PrintWriter
val pw = PrintWriter(System.out)
fun main(args: Array<String>) {
    func()
    pw.flush()
}
fun println(value: Any) { pw.println(value) }

fun func() {
    val (N, X) = listOfInt()
    val L = listOfInt()
    var d = 0
    var i = 0
    while (d <= X && i < N) {
        d = d + L[i++]
    }
    println("${if (d > X) i else i + 1}")
}

fun next() = readLine()!!
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map { Integer.parseInt(it) }
