function main(input) {
  const args = input.split('\n');
  const items1 = args[0].split(' ').map(i => parseInt(i));
  const N = items1[0];
  const X = items1[1];

  const List = args[1].split(' ').map(i => parseInt(i));

  var count = 0;
  var current = 0;
  for (var i = 0; i <= N; i++) {
    var tmp = current;
    current = tmp + List[i];
    if (current > X) {
      console.log(count + 1);
      return;
    }
    count++;
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
