#include <bits/stdc++.h>
using namespace std;
void need_for_speed() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int32_t main() {
  need_for_speed();
  long long n, q;
  cin >> n >> q;
  long long arr[n];
  for (long long i = 0; i < n; i++) cin >> arr[i];
  for (long long i = 1; i < n; i++) arr[i] += arr[i - 1];
  long long curr = 0;
  while (q--) {
    long long x;
    cin >> x;
    curr += x;
    if (curr >= arr[n - 1]) {
      cout << n << endl;
      curr = 0;
    } else {
      long long x = upper_bound(arr, arr + n, curr) - arr;
      cout << n - x << endl;
    }
  }
}
