#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, q;
  cin >> n >> q;
  vector<long long> v(n);
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
  }
  for (long long i = 1; i < n; ++i) {
    v[i] += v[i - 1];
  }
  vector<long long> time(q);
  for (long long i = 0; i < q; ++i) {
    cin >> time[i];
  }
  long long k = 0;
  for (long long i = 0; i < q; ++i) {
    k += time[i];
    long long ind = upper_bound(v.begin(), v.end(), k) - v.begin();
    if (ind == n && v[n - 1] <= k) {
      k = 0;
      cout << n << endl;
    } else if (v[ind] > k) {
      cout << n - ind << endl;
    } else {
      cout << n - ind - 1 << endl;
    }
  }
}
