#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, x;
  cin >> N >> x;
  vector<int> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  int sum = 0, j = 0;
  while (x >= sum) {
    sum += a[j];
    j++;
  }
  cout << j << endl;
}
