function Main(input){
	input = input.split("\n");
	var arr = input[1].split(" ").map(Number);
	var mem = input[0].split(" ").map(Number);
	var x = mem[1];
	var now = 0;
	var sum = 1;
	for(var i=0;i<arr.length;i++){
		now += arr[i];
		if(now<=x) sum++;
		else break;
	}
	console.log(sum)
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());