object Main extends App {
    var get = readLine.split(" ")
  var n = get(0).toInt
  var x = get(1).toInt
  var sum = 0
  var jump = 0
    var get2 = readLine.split(" ")
  for( i <- 0 until n){ 
    if(jump <= x)
    sum = sum + 1
    jump = jump + get2(i).toInt
  }
  println(sum)
}
  