#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
const int inf = INT_MAX;
const int mod = 1e9 + 7;
long long a[maxn];
long long p[maxn];
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, q;
  cin >> n >> q;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    p[i] = p[i - 1] + a[i];
  }
  long long all = p[n];
  long long now = 0;
  while (q--) {
    long long x;
    cin >> x;
    now += x;
    if (now >= all) {
      cout << n << endl;
      now = 0;
    } else {
      cout << n - (upper_bound(p, p + n + 1, now) - p) + 1 << endl;
    }
  }
}
