function Main(input) {

  var input = input.split("\n");
  var arya = input[0].split(" ").map(val => parseInt(val, 10)).slice(0, 2);
  var aryb = input[1].split(" ").map(val => parseInt(val, 10)).slice(0, arya[0]);
  var counter = 1;
  var sum = 0;
  aryb.forEach(function(e, i) {
    sum = sum + aryb[i];
    if(sum > arya[1]){
      return true;
    }
    counter++;
  })

  console.log(counter);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));