"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const X = parseInt(arg[0].split(" ")[1]);
    const L = arg[1].split(" ").map(n=>parseInt(n));
    
    let answer = 1;
    let now = 0;
    
    for(let i=0; i<N; i++) {
        if(now + L[i] <= X) {
            answer++;
            now += L[i];
        } else {
            break;
        }
    }
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));