#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    long long n, q, k, curr = 0;
    cin >> n >> q;
    vector<long long> v(n), a(n);
    for (int i = 0; i < n; i++) {
      cin >> v[i];
    }
    for (int i = 1; i < n; i++) {
      v[i] += v[i - 1];
    }
    while (q--) {
      cin >> k;
      curr += k;
      if (curr >= v[n - 1]) {
        cout << n << "\n";
        curr = 0;
      } else
        cout << v.end() - upper_bound(v.begin(), v.end(), curr) << "\n";
    }
  }
}
