#include <bits/stdc++.h>
using namespace std;
int search(long long int *arr, int n, long long int num) {
  int low = 1, high = n, mid, result = -1;
  while (low <= high) {
    mid = (low + high) / 2;
    if (num < arr[mid]) {
      result = mid;
      high = mid - 1;
    } else
      low = mid + 1;
  }
  return result;
}
int main() {
  int n, q, pos;
  long long int arr[200001];
  long long int arrow, sumarrow = 0;
  cin >> n >> q;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  for (int i = 2; i <= n; i++) arr[i] += arr[i - 1];
  for (int i = 0; i < q; i++) {
    cin >> arrow;
    sumarrow += arrow;
    pos = search(arr, n, sumarrow);
    if (pos == -1) {
      cout << n << endl;
      sumarrow = 0;
    } else {
      cout << n - pos + 1 << endl;
    }
  }
  return 0;
}
