fun main(args: Array<String>) {
    val NX = readLine()!!.split(" ").map(String::toInt)
    val Ls = readLine()!!.split(" ").map(String::toInt)
    val X = NX[1]

    var num = 0
    var i = 1
    for (l in Ls) {
        num += l
        if (num > X) {
            break
        }
        i++
    }
    println(i)
}