function Main(input) {

	input = input.split("\n");
	
	var ques = input[0].split(" ");
	var N = parseInt(ques[0]);
	var X = parseInt(ques[1]);
	
	var L = input[1].split(" ");
	var d = [];
	d[0] = 0;
	var i = 0;

	var leng = 0;
	var count = 0;
	
	while(leng <= X){
	    d[i+1] = d[i] + parseInt(L[i]);
	    count++;
	    leng = d[i+1];
	    i++;
	}
	
	console.log(count);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));