#include <bits/stdc++.h>
using namespace std;
const int MN = 755, MM = 2e5 + 5;
int n, q, arr[MN];
long long ans[MN];
priority_queue<int> S;
bool check(long long x, int lim) {
  int ret = 0;
  long long cur = x;
  for (int i = 0; i < n; ++i) {
    cur += arr[i];
    S.push(-arr[i]);
    while (cur < 0) {
      int t = S.top();
      cur += t;
      ret++;
      S.pop();
    }
  }
  while (!S.empty()) S.pop();
  return ret <= lim;
}
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> q;
  for (int i = 0; i < n; ++i) cin >> arr[i];
  for (int i = 0; i <= n; ++i) {
    long long L = 0, R = 1e15 + 5;
    while (L != R) {
      long long mid = (L + R) / 2;
      if (check(mid, i))
        R = mid;
      else
        L = mid + 1;
    }
    ans[n - i] = L;
  }
  while (q--) {
    long long b;
    cin >> b;
    cout << n - (upper_bound(ans, ans + n + 1, b) - ans - 1) << '\n';
  }
  return 0;
}
