#include <iostream>

using namespace std;

int main() {
	int n, x, l; cin >> n >> x;
	int now = 0, ans = 1;
	for (int i = 0; i < n; ++i) {
		cin >> l;
		now += l;
		if (now <= x) ans++;
	}
	cout << ans << endl;

	return 0;
}