function main(input) {
    input = input.split("\n");
    var n = parseInt(input[0].split(" ")[0]);
    var x = parseInt(input[0].split(" ")[1]);
    var list = input[1].split(" ").map(v=>parseInt(v,10));

    var i = 0;
    var d = 0;
    while(n > i) {
        d = d + list[i];
        if (d > x) break;
        i++;
    }

    console.log(i + 1);
}
 
main(require("fs").readFileSync("/dev/stdin", "utf8"));