import std.stdio, std.string, std.conv;

void main() {
    int[] tmp = readln.split.to!(int[]);
    int n = tmp[0], x = tmp[1];
    int[] l = readln.split.to!(int[]);
    int d, cnt = 1;
    foreach (i; 0 .. n) {
        d += l[i];
        if (d > x) break;
        ++cnt;
    }
    cnt.writeln;
}