#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i=a; i<=b; i++)
#define repd(i, a, b) for(int i=a; i>=b; i--)
#define vi vector<int>
#define vll vector<long long>
#define pii pair<int,int>
#define pll pair<long long,long long>
#define pb push_back
#define fr first
#define sc second
#define vb vector<bool>

typedef long long ll;
typedef unsigned long long ull;

/*struct cmp {
    bool operator()(const pair<int, pii> &p1, const pair<int, pii> &p2) {
        return p1.fr > p2.fr;
    }
};*/

void google(){
	static int tc=1;
	cout<<"Case #"<<tc<<": ";
	tc++;
}

ll n,q;

void solve(int tc = 1) {
	vll v(n);
	for(int i=0;i<n;i++) cin>>v[i];
	
	sort(v.begin(),v.end());

	for(int i=0;i<q;i++){
		ll k;
		cin>>k;
		
		ll l=1,r=2e18;
		ll ans=2e18;
		while(l<=r){
			ll mid=(l+r)/2;
			
			ll id=lower_bound(v.begin(),v.end(),mid+1)-v.begin();
			
			ll val=mid-id;
			
			// cout<<mid<<" "<<val<<endl;
			
			if(val==k){
				ans=min(ans,mid);
				r=mid-1;
			}
			else if(val>k){
				r=mid-1;
			}
			else{
				l=mid+1;
			}
		}
		
		cout<<ans<<endl;
	}
}

int main() {
/*#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif*/
    ios::sync_with_stdio(false);
    cin.tie(0);
    // cout << setprecision(16) << fixed;
    int t = 1;
    // cin >> t;
    int tc=0;
    
    while (t--) {
    	cin>>n>>q;
        tc++;
        solve(tc);
    }
}


#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define REP(i,n) for (int i = 1; i < (int)(n); i++)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define debug(var) do{cout << #var << " : "; view(var);}while(0)
template<class T> bool chmin(T &a, T b) {if(a>b) {a=b;return 1;}return 0;}
template<class T> bool chmax(T &a, T b) {if(a<b) {a=b;return 1;}return 0;}
using namespace std;
template<class T> void view(T e) {cout << e << endl;}
template<class T> void view(const vector<T> &v) {for(const auto &e : v){cout << e << " ";} cout << endl;}
template<class T> void view(const vector<vector<T>> &vv) {for(const auto &v : vv){view(v);}}
using vint = vector<int>;
using vvint = vector<vector<int>>;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<int,int>;
const int inf = 1<<30;
const ll inf_l = 1LL<<61;
const ll MAX = 1e18 + 1;

int main() {
    int n, q; cin >> n >> q;
    vll a(n + 2);
    for (int i = 1; i <= n; i++) cin >> a[i];
    a[0] = 0;
    a[n + 1] = inf_l;
    vll cnt(n + 1, 0);
    rep(i,n+1) {
        cnt[i] = a[i + 1] - a[i] - 1;
    }
    rep(i,n) cnt[i + 1] += cnt[i];
    // debug(cnt);
    rep(i,q) {
        ll k; cin >> k;
        int id = lower_bound(all(cnt), k) - cnt.begin();
        cout << a[id + 1] + (k - cnt[id]) - 1 << endl;
        // debug(id);
    }
}