fun main(args: Array<String>) {
  val input = readLine()!!.split(" ")
  val input2 = readLine()!!.split(" ")
  val n = Integer.parseInt(input[0])
  val x = Integer.parseInt(input[1])
  var d = 0
  var i = 0
  var count = 1
  while (i < n) {
    d = d + Integer.parseInt(input2[i])
    if (d <= x) {
      count++
    } else {
	  break
    }
    i++
  }
  println(count)
}