#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 20;
long long hp[MAXN], atc[MAXN];
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  long long sum = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%I64d", &hp[i]);
    sum += hp[i];
  }
  for (int i = 1; i < n; ++i) hp[i] += hp[i - 1];
  for (int i = 0; i < q; ++i) scanf("%I64d", &atc[i]);
  long long cur = sum;
  for (int i = 0; i < q; ++i) {
    if (atc[i] > cur) {
      printf("%d\n", n);
      cur = sum;
    } else {
      cur -= atc[i];
      if (cur == 0) {
        printf("%d\n", n);
        cur = sum;
      } else {
        int indx = upper_bound(hp, hp + n, sum - cur) - hp;
        printf("%d\n", n - indx);
      }
    }
  }
  return 0;
}
