#include <bits/stdc++.h>
using namespace std;
int main(){
    int n, q;
    cin >> n >>q;
    vector<long long> a(n), c(n);
    long long x;
    for (int i=0; i <n; i++){
        cin >> x;
        if (i == 0){
            a.at(i) = x;
            c.at(i) = x-1;
        }
        else{
            a.at(i) = x;
            c.at(i) = c.at(i-1) + x - a.at(i-1) -1; 
        }
    }
    vector<long long> k(q);
    
    for (auto& num : k){
        cin >> num;
    }

    for (auto num : k){
        if (c.at(n-1) <num){
            cout << a.at(n-1) + (num-c.at(n-1)) << endl;

        }
        else{
            auto index = lower_bound(c.begin(), c.end(),num) - c.begin();
            cout << a.at(index)-1-c.at(index) + num <<endl;
        }

    }
}
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--)
#define rrep(i,n) RREP(i,(n)-1,0)
#define all(v) v.begin(), v.end()
#define endk '\n'
const int inf = 1e9+7;
const ll longinf = 1LL<<60;
const ll mod = 1e9+7;
const ll mod2 = 998244353;
const ld eps = 1e-10;
template<typename T1, typename T2> inline void chmin(T1 &a, T2 b){if(a>b) a=b;}
template<typename T1, typename T2> inline void chmax(T1 &a, T2 b){if(a<b) a=b;}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, q; cin >> n >> q;
  vector<ll> A(n); rep(i, n) cin >> A[i];
  sort(all(A));
  vector<ll> K(q);
  rep(i, q) cin >> K[i];
  auto bsearch = [&](ll k) {
    auto test = [&](ll m) {
      return upper_bound(all(A), m) - begin(A) + k <= m;
    };
    ll ok = longinf, ng = 0;
    while(abs(ok-ng) > 1) {
      ll mid = (ok+ng)/2;
      (test(mid) ? ok : ng) = mid;
    }
    return ok;
  };
  rep(i, q) {
    cout << bsearch(K[i]) << endk;
  }
  return 0;
}
