#include<iostream>
using namespace std;

int main()
{
	int n,x,a[101],ans=1,d[101];
	cin>>n>>x;
	d[0]=0;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		d[i+1]=d[i]+a[i];
		if(d[i+1]<=x)
		{
			ans++;
		}
	}
	cout<<ans;
	return 0;
}