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

    val l = readLine()!!.split(" ").map { it.toInt() }
    val s = l.summed()
    println(s.count{ it<=x }+1)
}

inline fun List<Int>.summed(): List<Int> {
    var sum = 0
    return this.map { sum += it; sum }
}