#include <bits/stdc++.h>
int N, Q;
long long b[1 << 18];
long long solve(long long& x, int lives) {
  long long bx = b[N] - b[N - lives];
  if (bx <= x) {
    x = 0;
    return N;
  }
  int y = std::lower_bound(b, b + N + 1, x + b[N - lives] + 1) - b;
  x -= (b[y - 1] - b[N - lives]);
  return N - y + 1;
}
int main() {
  scanf("%d %d", &N, &Q);
  b[0] = 0;
  for (int i = 1; i <= N; ++i) {
    long long a;
    scanf("%lld", &a);
    b[i] = b[i - 1] + a;
  }
  int cur = N;
  long long r = 0;
  for (int i = 1; i <= Q; ++i) {
    long long x;
    scanf("%lld", &x);
    r += x;
    cur = solve(r, cur);
    printf("%d\n", cur);
  }
  return 0;
}
