import java.util.Scanner

fun main(args: Array<String>){
    val scn = Scanner(System.`in`) //Scannerのインスタンスを作成

    val n = scn.nextInt()
    val x = scn.nextInt()
    
    var boundNum = 0
    var distance = 0
    
    while(distance <= x && boundNum < n){
        boundNum++
        distance = distance + scn.nextInt()
    }
    if(distance <= x && boundNum == n){
        boundNum++
    }
    println(boundNum)
}