#include <bits/stdc++.h>
using namespace std;
long long int sol[200200];
int main() {
  int n, q;
  long long int a;
  long long int atk = 0;
  scanf("%d %d", &n, &q);
  for (int i = 1; i <= n; i++) {
    scanf(" %lld", &sol[i]);
    sol[i] += sol[i - 1];
  }
  while (q--) {
    scanf("%lld", &a);
    atk += a;
    int up = upper_bound(sol + 1, sol + n + 1, atk) - sol;
    if (up == n + 1) {
      printf("%d\n", n);
      atk = 0;
    } else {
      printf("%d\n", n - up + 1);
    }
  }
  return 0;
}
