#include <iostream>
using namespace std;

int main()
{
	int n, x;
	cin >> n >> x;
	int cnt = 0, d = 0;
	for(auto i = 0; i < n; ++i){
		int l;
		cin >> l;
		d += l;
		if(d <= x) ++cnt;
	}
	cout << cnt + 1 << endl;
	return 0;
}