#include <iostream>

using namespace std;

int main(void){
  int n,x,t,ans;
  
  cin >> n >> x;
  ans=1;
  for (int i=0; i<n; i++){
    cin >> t;
    x -= t;
    if (x>=0) ans++;
  }
  cout << ans << endl;
  return 0;
}
    
