fun main(args: Array<String>) {
    //val N = readLine()!!.toInt()
    val (n,x) = readLine()!!.split(" ").map { s -> s.toInt() }
    val L = readLine()!!.split(" ").map { s -> s.toInt() }
    var d = 0
    var cnt = 1
    L.forEach{
        l -> d += l
        cnt += if (d <= x) 1 else 0 
    }
    println(cnt)
}
