#include <bits/stdc++.h>
using namespace std;
inline long long R() {
  char c;
  long long res, sign = 1;
  while ((c = getchar()) > '9' || c < '0')
    if (c == '-') sign = -1;
  res = c - '0';
  while ((c = getchar()) >= '0' && c <= '9') res = res * 10 + c - '0';
  return res * sign;
}
priority_queue<long long> q;
const long long N = 210000;
long long a[N], n, m, pre[N], cnt;
signed main() {
  n = R();
  m = R();
  for (long long i = 1; i <= n; i++) a[i] = R();
  for (long long i = n; i >= 1; i--) {
    if (a[i] < 0)
      q.push(a[i]);
    else {
      while (!q.empty() && a[i] >= 0) a[i] += q.top(), q.pop();
      if (a[i] < 0) q.push(a[i]);
    }
  }
  while (!q.empty()) pre[++cnt] = q.top(), q.pop();
  for (long long i = 1; i <= cnt; i++) pre[i] = -pre[i] + pre[i - 1];
  while (m--)
    printf("%lld\n",
           (cnt - (upper_bound(pre + 1, pre + 1 + cnt, R()) - pre) + 1));
}
