#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include <functional>
#include<cmath>
#include<string>
#include<string.h>
#include<iomanip>
#include<algorithm>
#include<cctype>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#include <stdio.h> 
#include<bitset>
using namespace std;
#define endl '\n'
#define ll long long 
#define d double
#define ull unsigned long long
#define ld long double
#define PI acos(-1)
#define f(n) for (int i = 0; i <n; i++)
#define fn(n) for (int i = 1; i <=n; i++)
#define cc cout<<'\n'
#define all(v) v.begin(),v.end()
#define allr(v) v.rbegin(),v.rend()
#define sz(x) x.size()
#define fx(n) fixed<<setprecision(n)
#define Ceil(x,y) (x+y-1)/y
#define rt return 
#define mem(x,y)    memset(x,y,sizeof(x))
#define RT(n) rt cout<<n,0
#define test ll t;cin>>t;while(t--)
const ll MOD = 1e9 + 7;
using namespace std;
void A_KHALIFA()
{
	std::ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
}
void file() {
	//cout << flush;
#ifndef ONLINE_JUDGE
	freopen("standard.in", "r", stdin);
	freopen("standard.out", "w", stdout);
#endif
	//freopen("cases.in", "r", stdin);
	//freopen("output.out", "w", stdout);
}
ll fastpow(ll x, ll k)
{
	ll ret = 1;
	while (k) {
		if (k & 1) ret = ((ret % MOD) * (x % MOD)) % MOD;
		k >>= 1; x = ((x % MOD) * (x % MOD)) % MOD;
	}
	return ret;
}
int main()
{
	file();
	A_KHALIFA();

	int n, q;
	cin >> n >> q;
	vector<ll>v(n);
	vector<ll>vv(n);
	vector<ll>prefix(n);
	for (int i = 0; i < n; i++)
	{
		cin >> v[i];
	}
	sort(all(v));
	vv[0] = v[0] - 1;
	for (int i = 1; i < n; i++)
	{
		vv[i] = v[i] - (v[i-1]+1);
	}
	/*for (int i = 0; i < n; i++)
	{
		cout << vv[i] << ' ';
	}cc;
	rt 0;*/
	prefix[0] = vv[0];
	for (int i = 1; i < n; i++)
	{
		prefix[i] = vv[i];
		prefix[i] += prefix[i - 1];
	}
	/*for (int i = 0; i < n; i++)
		cout << prefix[i] << ' ';*/

	while (q--)
	{
		ll num;
		cin >> num;
		if (num <= prefix.back())
		{
			int l = 0, r = n - 1, mid,idx;
			while (l <= r)
			{
				mid = (l + r) / 2;
				if (prefix[mid] < num)
				{
					l = mid + 1;
				}
				else 
				{
					r = mid - 1; idx = mid;
				}
			}
			cout << v[idx] - (prefix[idx] - num + 1) << endl;
			
		}
		else
		{
			cout << v.back() + (num - prefix.back()) << endl;
		}
	}



	

}
#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;

#define all(a) (a).begin(), (a).end()
#define mp make_pair

template<typename T1, typename T2> 
inline void chkmin(T1& x, const T2& y) {
    if (y < x) x = y;
}

template<typename T1, typename T2>
inline void chkmax(T1& x, const T2& y) {
    if (x < y) x = y;
}

const int N = 1e5 + 228;
const ll INF = (ll)1e18 + N;
int n, q;
ll a[N];

bool check(ll val, ll cnt) {
    int pos = upper_bound(a, a + n, val) - a;
    return val - pos >= cnt;
}

void solve() {
    ll k;
    cin >> k;
    ll l = 0, r = INF;
    while (l < r - 1) {
        ll m = (l + r) / 2;
        if (check(m, k)) {
            r = m;
        } else {
            l = m;
        }
    }
    cout << r << '\n';
}

signed main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    cout.precision(20), cout.setf(ios::fixed);
    cin >> n >> q;
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
    }
    while (q--) {
        solve();
    }
    return 0;
}