const main = (inputs) => {
  var N = inputs[0].split(" ")[0]-0;
  var X = inputs[0].split(" ")[1]-0;
  var l = inputs[1].split(" ").map(v=>v-0);
  var ans = 0;
  var pos = 0;
  for(var i=0;i<l.length;i++){
    if(pos<=X){
      ans ++;
    }
    pos += l[i];
  }
  if(pos<=X){
    ans ++;
  }
  console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8').trim().split("\n"));
