#include <bits/stdc++.h>
using namespace std;

int main(){
  int N,X,cnt=0,L;
  cin>>N>>X;
  for(int i=0;i<N;i++){
    cin>>L;
    cnt+=L;
    if(cnt>X){
      cout<<i+1<<endl;
      return 0;
    }
  }
  cout<<N+1<<endl;
}