#include <bits/stdc++.h>
using namespace std;
int a[800], n, m;
long long ans[800];
bool check(long long mid, int x) {
  priority_queue<int, vector<int>, greater<int> > q;
  long long sum = mid;
  for (int i = 1; i <= n; i++) {
    sum = sum + a[i];
    q.push(a[i]);
    if (sum < 0) {
      sum = sum - q.top();
      q.pop();
      if (--x < 0) return 0;
    }
  }
  return 1;
}
long long calc(int x) {
  long long l = 0, r = 1ll << 50, mid, ans;
  for (; l <= r;) {
    mid = (l + r) >> 1;
    if (check(mid, x))
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  return ans;
}
int main() {
  scanf("%d%d\n", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 0; i <= n; i++) ans[n - i] = calc(i);
  for (int i = 1; i <= m; i++) {
    long long x;
    scanf("%I64d\n", &x);
    printf("%d\n", n - (upper_bound(ans, ans + n + 1, x) - ans) + 1);
  }
}
