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

void main() {
  const tmp = readln.split.to!(int[]);
  const N = tmp[0];
  const X = tmp[1];
  const Ls = readln.split.to!(int[]);
  
  int p = 0;
  int cnt;
  foreach (i; 0..N+1) {
    if (p > X) break;
    p += Ls[i];
    cnt++;
  }
  writeln(cnt);
}
