fun main(args: Array<String>) {
    val sc = java.util.Scanner(System.`in`)
    val n = sc.nextInt()
    val x = sc.nextInt()
    val L = sc.asSequence().take(n).map { it.toInt() }.toList()
    var r = 0
    var p = 0

    while (r < n) {
        p += L[r]
        if (p <= x) {
            r++
        } else {
            break
        }
    }
    r++
    println(r)
}
