#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const long long INF = 1e17;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long long> anses(n + 1);
  for (int i = 0; i <= n; i++) {
    long long l = -1, r = 1e13;
    while (r - l > 1) {
      long long m = (l + r) / 2;
      priority_queue<long long> mn;
      long long now = m;
      int ans = 0;
      for (int j = 0; j < n; j++) {
        mn.push(-a[j]);
        now += a[j];
        if (now < 0) {
          ans++;
          now += mn.top();
          mn.pop();
        }
      }
      if (ans <= i) {
        r = m;
      } else {
        l = m;
      }
    }
    anses[i] = r;
  }
  reverse((anses).begin(), (anses).end());
  while (m--) {
    long long q;
    cin >> q;
    int ind = upper_bound((anses).begin(), (anses).end(), q) - anses.begin();
    cout << n - ind + 1 << "\n";
  }
  return 0;
}
