function Main(input) {
    const N = parseInt(input.shift())
    const X = parseInt(input.shift())
    const Ls = input.map(x => parseInt(x));

    var current = 0;
    var sum = 1;
    for (var i = 0; i < N; i++) {
        current += Ls[i];
        if(current <= X) {
            sum++;
        }
    }
    console.log(sum);
}

// 1行入力の場合
// Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());

// 改行で分割
// Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n/));

// 改行・空白で分割
Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));