#include <bits/stdc++.h>
using namespace std;
signed long long N, Q;
void solve() {
  int i, j, l, r, x, y;
  string s;
  cin >> N >> Q;
  vector<signed long long> a, a2, asum, k, ksum;
  for (i = 0; i < (N); i++) {
    signed long long input;
    cin >> input;
    a.push_back(input);
  }
  for (i = 0; i < (Q); i++) {
    signed long long input;
    cin >> input;
    k.push_back(input);
  }
  a2 = a;
  asum.push_back(0);
  for (x = 0; x < (N); x++) {
    asum.push_back(asum[x] + a[x]);
  }
  ksum.push_back(0);
  for (x = 0; x < (Q); x++) {
    ksum.push_back(ksum[x] + k[x]);
  }
  int resetId = 0;
  for (x = 0; x < (Q); x++) {
    signed long long enemy = N + 1 -
                             (upper_bound((asum.begin()), (asum.end()),
                                          (ksum[x + 1] - ksum[resetId])) -
                              asum.begin());
    if (enemy == 0) {
      resetId = x + 1;
      enemy = N;
    }
    cout << enemy << endl;
  }
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false), cin.tie(0);
  for (i = 0; i < (argc - 1); i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < (s.size()); i++) ungetc(s[s.size() - 1 - i], stdin);
  cout.tie(0);
  solve();
  return 0;
}
