#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 7;
long long read() {
  long long s = 0, w = 1;
  char c;
  while (c = getchar(), c > '9' || c < '0')
    if (c == '-') w = -1;
  while (c >= '0' && c <= '9') s = s * 10 + c - '0', c = getchar();
  return s * w;
}
void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 | '0');
}
void wsp(long long x) {
  write(x);
  putchar(' ');
}
void wln(long long x) {
  write(x);
  putchar('\n');
}
long long n, m;
long long a[N];
priority_queue<long long> q;
signed main() {
  n = read();
  m = read();
  for (long long i = 1; i <= n; i++) a[i] = read();
  for (long long i = n; i; i--) {
    if (a[i] < 0)
      q.push(a[i]);
    else {
      while (a[i] && !q.empty()) {
        long long x = q.top();
        q.pop();
        long long V = min(-x, a[i]);
        x += V;
        a[i] -= V;
        if (x) q.push(x);
      }
    }
  }
  while (!q.empty()) a[++*a] = -q.top(), q.pop();
  n = *a;
  for (long long i = 2; i <= n; i++) a[i] += a[i - 1];
  while (m--) {
    long long x = read();
    x = upper_bound(a + 1, a + n + 1, x) - a;
    wln(n - x + 1);
  }
}
