#include <bits/stdc++.h>
using namespace std;
int search(long long int arrows, long long int* arr, int i, int j) {
  if (j < i) return -1;
  if (j == i) return i;
  int mid = (i + j) / 2;
  if (arr[mid] <= arrows)
    return search(arrows, arr, mid + 1, j);
  else
    return search(arrows, arr, i, mid);
}
int bin(long long int arrows, long long int* arr, int i, int j) {
  if (arrows >= arr[j])
    return 0;
  else
    return search(arrows, arr, i, j);
}
int main() {
  int n, q;
  cin >> n;
  cin >> q;
  long long int* srg = new long long int[n];
  long long int* arrowt = new long long int[q];
  for (int i = 0; i < n; i++) {
    cin >> srg[i];
  }
  for (int j = 0; j < q; j++) cin >> arrowt[j];
  for (int i = 1; i < n; i++) {
    srg[i] = srg[i] + srg[i - 1];
  }
  for (int j = 1; j < q; j++) {
    if (arrowt[j - 1] >= srg[n - 1]) {
    } else
      arrowt[j] = arrowt[j] + arrowt[j - 1];
  }
  for (int j = 0; j < q; j++) {
    int index = bin(arrowt[j], srg, 0, n - 1);
    int standing = n - index;
    cout << standing << endl;
  }
  return 0;
}
