function main(input) {
  const args = input.split('\n');
  const row = args[0].split(' ').map(n => parseInt(n, 10));
  const N = row[0],
        X = row[1];
  const ary = args[1].split(' ').map(n => parseInt(n, 10));
  let dist = 0;
  
  for (let i = 0; i < N; i++) {
    dist += ary[i];
    if (dist > X) {
      console.log(i+1);
      break;
    }
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));