#include<bits/stdc++.h>
using namespace std;

int main(){
	int n,x;
	cin>>n>>x;
	//n = n+1;
	int s =0;
	int l,ans,cnt=1;
	while(n--){
		cin>>l;
		ans = s+l;
		s= ans;
		if(ans<=x)
			cnt++;
		else
			break;
	}
	cout<<cnt;
}