#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int Inf = 1e9 + 1;
const int Mod = 1e9 + 7;
const double eps = 1e-15;
const double EPS = 1e-9;
const double PI = acos(-1.0);
int GCD(int x, int y) {
  if (x % y == 0)
    return y;
  else
    return (GCD(y, x % y));
}
unsigned long long totar[200006];
unsigned long long ar[200006];
int n, q;
vector<unsigned long long> v;
int main() {
  cin >> n >> q;
  unsigned long long tot = 0;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    tot += ar[i];
    v.push_back(tot);
  }
  tot = 0;
  unsigned long long baki = 0, x, y, z;
  int id;
  int sz = v.size();
  for (int i = 0; i < q; i++) {
    cin >> ar[i];
    tot += ar[i];
    id = upper_bound(v.begin(), v.end(), tot) - v.begin();
    if (id == sz) {
      tot = 0;
      cout << n << endl;
    } else {
      cout << sz - id << endl;
    }
  }
  return 0;
}
