function Main(input) {
  const line = input.split('\n');
  var tmp = line[0].split(' ');
  const N = tmp[0];
  const X = parseInt(tmp[1], 10);;
  var ans = 1;
  var inc = 0;
  tmp = line[1].split(' ');
  var Ls = [];
  for (var v of tmp) {
    Ls.push(parseInt(v,10));
  }
  for (var v of Ls) {
    inc += v;
    if (inc<=X){
      ans++;
    }else{
      break;
    }
  }
  console.log('%d',ans);
}

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