fun main(args: Array<String>) {
    val (countN, pointX) = readLine()!!.split(" ").map { it.toInt() }
    val listL = readLine()!!.split(" ").map { it.toInt() }

    var currentPoint = 0
    var boundCount = 1
    for (i in 0 until countN) {
        currentPoint += listL[i]
        if (currentPoint > pointX) break else boundCount++
    }

    print(boundCount)
}