'use strict'
function Main(input) {
  let jumpNum = input.split("\n")[0].split(" ")[0]*1;
  let jumpLimit = input.split("\n")[0].split(" ")[1]*1;
  let arr = input.split("\n")[1].split(" ");
  let count = 1;
  let sum = 0;
  for(let i in arr){
    sum += arr[i]*1;
    if(sum <= jumpLimit){
    	count++;
    }
    else{
		break;
    }
  }
  console.log(count);
}

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