#include <iostream> 
using namespace std;
int main(){
  int n,x;cin>>n>>x;
  int sm = 1;
  int subbb = 0;
  for(int i = 0; n > i; i++){
    int tmp;cin>>tmp;
    subbb += tmp;
    if(subbb<=x)sm++;
  }
  cout << sm << endl;
}