import java.util.Scanner;

fun main(args: Array<String>){
    val sc = Scanner(System.`in`)
    val N = sc.nextInt()
    val X = sc.nextInt()
    var position = 0
    var bounds = 1
    for(i in 0 until N){
       position += sc.nextInt()
       if(position <= X){
           bounds++
       }
    }
    println(bounds)
}