																//  SMOKE SHISHA PLAY FIFA  // 
#include<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef long double ld;

#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
#define pll pair<ll,ll>
#define MP make_pair
#define ff first
#define ss second
#define PB push_back
#define mod 1000000007
#define lp(i,start,end) for(ll i=start;i<=end;i++) 
#define deb1(a) cout<<#a<<" = "<<(a)<<endl;
#define deb2(a,b) cout<<#a<<" = "<<(a)<<", "<<#b<<" = "<<(b)<<endl;
#define deb3(a,b,c) cout<<#a<<" = "<<(a)<<", "<<#b<<" = "<<(b)<<", "<<#c<<" = "<<(c)<<endl;


ll modu(ll a, ll b)
{
	ll ans =1;
	while(b>0)
	{
		if(b&1)
		ans = (ans*a)%mod;
		b/=2;
		a = (a*a)%mod;
	}
	return ans;
}

int main()
{
	fastio
	ll n,q;
	cin>>n>>q;
	vector<pair<ll,ll>>fi;
	fi.PB({0,0});
	lp(i,0,n-1){
		ll x;
		cin>>x;
		fi.PB({x,0});
	}
	sort(fi.begin(),fi.end());
	lp(i,1,n){
		fi[i].ss=fi[i-1].ss+fi[i].ff-fi[i-1].ff-1;
	}
	while(q--){
		ll y;
		cin>>y;
		ll l=0,r=n,m;
		while(l<r){
			m=(l+r)/2;
			if(fi[m].ss<y)
				l=m+1;
			else
				r=m;
		}
		//cout<<l<<" ";
		if(fi[l].ss>=y)
			l--;
		cout<<fi[l].ff+y-fi[l].ss<<endl;
	}
	return 0;	
}

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define LL long long
#define MAXN 110000
#define MOD 
using namespace std;
int T,n,m;
LL a[MAXN];
int sum[MAXN];
LL work(LL x)
{
    LL L=1,R=2e18;

    while(L!=R)
    {
        LL mid=(L+R)/2;
        int loc = upper_bound(a+1,a+n+1,mid) - (a+1);
        if(mid-sum[loc] >= x)
            R=mid;
        else
            L=mid+1;
    }
    return L;
}
int main()
{
    scanf("%d%d",&n,&m);
    for(int i=1;i<=n;i++)scanf("%lld",&a[i]);

    sort(a+1,a+n+1);

    for(int i=1;i<=n;i++)
    {
        if(i==1||a[i]!=a[i-1])
            sum[i]++;
        sum[i]+=sum[i-1];
    }

    for(int i=1;i<=m;i++)
    {
        LL x;
        scanf("%lld",&x);
        printf("%lld\n",work(x));
    }
    return 0;
}