#include <bits/stdc++.h>
using namespace std;
ifstream fin(
    ""
    ".in");
ofstream fout(
    ""
    ".out");
const int MAX_N = 200100;
vector<long long> a(MAX_N, 0);
vector<long long> pref(MAX_N, 0);
int main() {
  ios_base::sync_with_stdio(false);
  int n, q;
  cin >> n >> q;
  cin >> a[0];
  pref[0] = a[0];
  for (int i = 1; i < n; i++) {
    cin >> a[i];
    pref[i] = pref[i - 1] + a[i];
  }
  long long k = 0;
  while (q--) {
    long long newK;
    cin >> newK;
    k += newK;
    int l = -1;
    int r = n;
    while (l < r - 1) {
      int m = (l + r) >> 1;
      if (k >= pref[m]) {
        l = m;
      } else {
        r = m;
      }
    }
    if (l >= n - 1) {
      k = 0;
      cout << n << "\n";
    } else {
      cout << n - r << "\n";
    }
  }
  return 0;
}
