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

int main(){
  int n,x,i,cur=0,ans=1;
  cin >> n >> x ;
  
  while(cur<=x && ans<=n){
    cin >> i;
    cur+=i;
    if(cur>x) break;
    ans++;
  }
  cout << ans;
}