#include<stdio.h>
int d[105],l[105];
int main()
{
	int n,x,i,j;
	while(~scanf("%d%d",&n,&x))
	{
		int sum=0;
		for(i=1;i<=n;i++)
		    scanf("%d",&l[i]);
		d[1]=0;
		for(j=2;j<=n+1;j++)
		    d[j]=d[j-1]+l[j-1];
		for(i=1;i<=n+1;i++)
		    if(x>=d[i])sum++;
		    else break;
		printf("%d\n",sum);    
	}
}
