#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;
using ll = long long;

int main(){
    ll n, q;
    cin >> n >> q;
    vector<ll> a(n);
    for(ll&v:a) cin >> v;
    while(q--) {
        ll k;
        cin >> k;
        ll ok = 2e18;
        ll ng = 0;
        while(ok-ng > 1) {
            ll m = (ok+ng)/2;
            ll d = upper_bound(a.begin(), a.end(), m) - a.begin();
            ll nth = m - d;
            if(nth >= k) {
                ok = m;
            } else {
                ng = m;
            }
        }
        cout << ok << endl;
    }
}

#include<iostream>
#include<bits/stdc++.h>
#define m_p make_pair
#define fi first
#define se second
#define pb push_back
typedef long long ll;
#define f(i,n) for(ll i=0;i<n;i++)
#define f1(i,n) for(ll i=1;i<=n;i++)
#define   crap ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0)
using namespace std;
#define INF 1000000
#define vll vector<ll>
const int M = 1e9+7;
ll fastpower(ll x,ll n,ll M)
{
    if(n==0)
        return 1;
    else if(n%2 == 0)        //n is even
        return fastpower((x*x)%M,n/2,M);
    else                             //n is odd
        return (x*fastpower((x*x)%M,(n-1)/2,M))%M;
}
ll GCD(ll A, ll B) {
    if(B==0)
        return A;
    else
        return GCD(B, A % B);
}
bool vowl(char c)
{
  return c=='a'||c=='e'||c=='i'||c=='o'||c=='u';
}
ll modInverse(ll A,ll M)// when M is prime
{
    return fastpower(A,M-2,M);
}
void sieve(ll N) {
        bool isPrime[N+1];
        for(ll i = 0; i <= N;++i) {
            isPrime[i] = true;
        }
        isPrime[0] = false;
        isPrime[1] = false;
        for(ll i = 2; i * i <= N; ++i) {
             if(isPrime[i] == true) {                    //Mark all the multiples of i as composite numbers
                 for(ll j = i * i; j <= N ;j += i)
                     isPrime[j] = false;
            }
        }
    }
vector<ll> factorize(ll n) {
    vector<ll> res;
    for (ll i = 2; i * i <= n; ++i) {
        while (n % i == 0) {
            res.push_back(i);
            n /= i;
        }
    }
    if (n != 1) {
        res.push_back(n);
    }
    return res;
}
 
int main()
{
    crap;
    #ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
        #endif
        ll n,q;
        cin>>n>>q;
        ll arr[n];
        f(i,n)cin>>arr[i];
        map<ll,ll> mp;
        ll p=1;
        for(int i=0;i<n;i++)
        {
            mp[arr[i]]=p++;
        }
        while(q--)
        {
            ll x;
            cin>>x;
            ll a=1,b=1e18+1e6;
            ll ans;
            while(a<=b)
            {
                unsigned long long int  mid=(b+a)/(ll)2;
                auto it=mp.upper_bound(mid);
                ll l;
                if(it==mp.end())l=n;
                else
                    l=it->second-1;
                ll y=x+l;
                if(y>mid)
                {
                    
                    a=mid+1;
                }
                else
                {
                    if(mp.find(mid)==mp.end()&&(x+l)==mid)ans=mid;
                    b=mid-1;
                }
            }
            cout<<ans<<"\n";
        }
    return 0;
}