fun main(args: Array<String>) {
    val (n, x) = readLine()!!.split(" ").map { it.toInt() }
    val l = readLine()!!.split(" ").map { it.toInt() }
    var d = 0
    var cnt = 1
    for (ll in l) {
        d += ll
        if (d > x) break
        cnt += 1
    }
    print(cnt)
}