function Main(input){
  var n = input.split("\n");
  var N = n[0].split(" ")[0];
  var X = n[0].split(" ")[1];
  var L = n[1].split(" ");
  var D = 0;
  var count = 1;
  for(i=0;i<=(N-1);i++){
    L[i] = parseInt(L[i],10);
  }
  for(j=0;D<=X;j++){
    D += L[j];
    count += 1;
  }
  count -= 1;
  console.log(count);
}
    Main(require('fs').readFileSync('/dev/stdin','utf8'));