#include <iostream>

using namespace std;

int main() {
	int res = 1;
	int n, x;
	cin >> n >> x;
	int l;
	int t = 0;
	for (int i = 0; i < n; i++) {
		cin >> l;
		t += l;
		if (t <= x) res++;
		else break;
	}
	cout << res;
}