#include <bits/stdc++.h>
using namespace std;
int main(){
  int N, X;
  cin >> N >> X;
  int D = 0;
  int L;
  int ans = 0;
  while (D <= X){
    ans++;
    cin >> L;
    D += L;
  }
  cout << min(ans, N+1) << endl;
}