object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val n, x = sc.nextInt
    val list = List.fill(n)(sc.nextInt)

    def counter(d: Int, dx: List[Int], count: Int): Int = x < d match {
      case true => count
      case _    => counter(d + dx.head, dx.tail, count + 1)
    }

    println(counter(0, list, 0))
  }
}