#include <bits/stdc++.h>
using namespace std;
long long acum[200010], arr[200010], qy[200010];
int bs(int l, int r, long long key) {
  while (l < r) {
    int m = (l + r) / 2;
    if (acum[m] < key)
      l = m + 1;
    else
      r = m;
  }
  return l;
}
int main() {
  ios_base::sync_with_stdio(0);
  int n, q;
  cin >> n >> q;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  for (int i = 0; i < q; ++i) {
    cin >> qy[i];
  }
  acum[0] = arr[0];
  for (int i = 1; i < n; ++i) {
    acum[i] = acum[i - 1] + arr[i];
  }
  long long adding = 0;
  for (int i = 0; i < q; ++i) {
    adding += qy[i];
    int idx = bs(0, n, adding);
    if (idx >= n) {
      cout << n << "\n";
      adding = 0;
    } else if (acum[idx] - adding > 0)
      cout << n - idx << "\n";
    else {
      if (idx == n - 1) {
        adding = 0;
        cout << n << "\n";
      } else
        cout << n - idx - 1 << "\n";
    }
  }
}
