#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=1e5+5;
int n,q;
const ll inf=1e18;
ll a[maxn],delta[maxn],sum[maxn],k;
int main()
{

    scanf("%d%d",&n,&q);
    for(int i=1;i<=n;i++)
    {
        scanf("%lld",&a[i]);
        delta[i-1]=a[i]-a[i-1]-1;
    }
    delta[n]=inf;
    sum[0]=delta[0];
    for(int i=1;i<=n;i++) sum[i]=sum[i-1]+delta[i];
    for(int i=1;i<=q;i++)
    {
        scanf("%lld",&k);
        if(a[1]>k){ printf("%lld\n",k); continue;}
        int pos=lower_bound(sum,sum+n+1,k)-sum;
        printf("%lld\n",a[pos]+k-sum[pos-1]);
    }
    return 0;
}
#include "bits/stdc++.h"
using namespace std;
using ll=long long;
using vi=vector<int>;
using vvi=vector<vi>;
using vll=vector<ll>;
using vvll=vector<vll>;
using pii=pair<int,int>;
#define rep(i,n) for(int i=0;i<(n);i++)
#define sor(v) sort(v.begin(),v.end())
#define rev(v) reverse(v.begin(),v.end())
#define pb push_back
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
//const int INF = 1123456789;
//const int mod = 1e9+7;
//const int mod=998244353;
int main(){
    int n,q; cin>>n>>q;
    vll a(n); rep(i,n) cin>>a[i];
    sor(a);
    vll v=a;
    rep(i,n) v[i]+=i;
    /*rep(i,q){
        ll k; cin>>k;
        auto itr=upper_bound(v.begin(),v.end(),k);
        if(itr==v.begin()) {cout<<k<<endl; continue;}
        itr--;
        cout<<*itr+k+a[itr-v.begin()]-1;
    }*/
    vector<pair<ll,int>> k(q);
    rep(i,q) {
        ll K; cin>>K;
        k[i]={K,i};
    }
    vll ans(q);
    sor(k);
    int m=0;
    rep(i,q){
        ll an=k[i].first+m;
        while(true){
            if(m<n&&a[m]<=an) {m++;an++;}
            else break;
        }
        
        ans[k[i].second]=an;
    }
    rep(i,q) cout<<ans[i]<<endl;
}
