fun main(args:Array<String>){
  var (n,x) = readLine()!!.split(" ").map(String::toInt)
  var l = readLine()!!.split(" ").map{it.toInt()}
  var m = 0
  var count = 1    
  for(i in 0..n-1){
    m += l[i]
    if(m>x)break
    count++  
  }
  println(count)
}