#include <bits/stdc++.h>
const int MAXN = 2e5 + 10;
using namespace std;
long long ans1[MAXN], ans2[MAXN];
long long a[MAXN], b[MAXN];
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  for (int i = 1; i <= n; i++)
    scanf("%lld", &a[i]), ans1[i] = ans1[i - 1] + a[i];
  for (int i = 1; i <= q; i++)
    scanf("%lld", &b[i]), ans2[i] = ans2[i - 1] + b[i];
  long long pos = 0;
  for (int i = 1; i <= q; i++) {
    if (ans2[i] - pos >= ans1[n]) {
      printf("%d\n", n);
      pos = ans2[i];
      continue;
    }
    long long t = ans2[i] - pos;
    int t1 = lower_bound(ans1 + 1, ans1 + n + 1, t) - ans1 - 1;
    if (t == ans1[t1 + 1]) t1++;
    printf("%d\n", n - t1);
  }
  return 0;
}
