#include<iostream>
#include<string>
using namespace std;
int main(){	
	int i,n,x,s=0,p=1;
	cin>>n>>x;
	int a[n+1];
	for(i=1;i<=n;i++)cin>>a[i];
	
	for(i=1;i<=n;i++){
		s=s+a[i];
		if(s<=x)p++;
		if(s>x)break;
	}
	cout<<p;
}