var line = require("fs").readFileSync("/dev/stdin", "utf8").split("\n");

var line1words = line[0].split(" ");
var n = tmp[0];
var x = tmp[1];
var line2words = line[1].split(" ");

var d = 0;
for(var i = 0; d < x; i++) {
    d += line2words[i];
}
console.log(d > x ? i : i + 1);