function Main(input) {
	var list = input.split("\n")[1].split(" ").map((list)=>Number(list));
  var end = parseInt(input.split("\n")[0].split(" ")[1]);
  var output = 1;
  var position = 0;
  for(var i = 0; i < list.length; i++){
    if(position > end){
       console.log(output);
      return;
    }
    position += list[i];
    output++;
  }
}

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