fun main (args : Array<String>) {
	val (n, x) = readLine()!!.split(" ").map(String::toInt)
	val N : Int = n.toInt()
	val X : Int = x.toInt()
	val list = readLine()!!.split(" ").map(String::toInt)
	var lList : MutableList<Int> = mutableListOf()
	for (i in 0..N - 1) {
		lList.add(list[i])
	}
	var num : Int = 0
	var result : Int = 1
	for (i in 0..N - 1) {
		num += lList[i]
		if (num <= X) {
			result++
		}
	}
	println("${result}")
}