#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    T t = bigmod(p, e / 2, M);
    return (t * t) % M;
  }
  return (bigmod(p, e - 1, M) * p) % M;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T multimod(T a, T b, T m) {
  T ans = 0ll;
  a %= m, b %= m;
  while (b) {
    if (b & 1ll) ans = m - ans > a ? (ans + a) : (ans + a - m);
    b >>= 1ll;
    a = (m - a) > a ? a + a : a + a - m;
  }
  return (T)ans;
}
long long dp[760][760];
long long arr[760];
int main() {
  int i, j, k;
  int n, m;
  scanf("%d %d", &n, &m);
  for (i = 0; i < n; i++) {
    scanf("%lld", &arr[i]);
  }
  for (i = n - 1; i >= 0; i--) {
    for (j = 0; j <= n; j++) {
      dp[i][j] = max(dp[i + 1][j] - arr[i], -arr[i]);
      if (j) {
        dp[i][j] = min(dp[i][j], dp[i + 1][j - 1]);
      }
    }
  }
  long long num;
  while (m--) {
    scanf("%lld", &num);
    int st = 0, ed = n, mid, ans = n;
    while (st <= ed) {
      mid = (st + ed) / 2;
      if (num >= dp[0][mid]) {
        ans = mid;
        ed = mid - 1;
      } else
        st = mid + 1;
    }
    printf("%d\n", ans);
  }
  return 0;
}
