#include <bits/stdc++.h>
using ll = long long int;
const ll MOD = 1e9 + 7;
using namespace std;
ll n, q, sum, arw, t;
ll arr[200005];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> q;
  for (ll i = 1; i <= (n); ++i) cin >> t, arr[i] += t + arr[i - 1];
  for (ll i = 1; i <= (q); ++i) {
    cin >> arw, sum += arw;
    auto itr = upper_bound(arr + 1, arr + n + 1, sum);
    if (*itr == 0)
      sum = 0, cout << n << '\n';
    else
      cout << (n - (itr - arr - 1)) << '\n';
  }
  return 0;
}
