#include<bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
#define int long long
//typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

signed main() {
    FAST
    int n,q;
    cin>>n>>q;
    vi v(n+1);
    for (int i = 1; i <= n; ++i) cin>>v[i];
    while (q--) {
        int k; cin>>k;

        int lo = 1, hi = n, mid,ans=-1;
        while (lo <= hi) {
            mid = lo + (hi - lo) / 2;
            int x=v[mid]-mid;
            if(x<k) lo=mid+1;
            else {
                int y = v[mid - 1] - (mid - 1);
                int tmp = k - y;
                int z = v[mid] - v[mid - 1] - 1;
                if (tmp>=1 and tmp <= z) {
                    ans=v[mid-1]+tmp;
                    break;
                }
                hi=mid-1;
            }
        }
        if(~ans) cout<<ans<<endl;
        else {
            int yy=v[n]-n;
            k-=yy;
            cout<<v[n]+k<<endl;
        }
    }
}
#include <bits/stdc++.h>

using namespace std;

#define REP(i, n)   for(int i = 0; i < (n); i++)
#define REPS(i, n)  for(int i = 1; i <= (n); i++)
#define RREP(i, n)  for(int i = (n)-1; i >= 0; i--)
#define RREPS(i, n) for(int i = (n); i > 0; i--)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define YES cout << "YES" << endl
#define Yes cout << "Yes" << endl
#define NO cout << "NO" << endl
#define No cout << "No" << endl

using ll  = long long;
using pi  = pair<int, int>;
using pl  = pair<ll, ll>;
using vi  = vector<int>;
using vl  = vector<ll>;
using vs  = vector<string>;
using vb  = vector<bool>;
using vvi = vector<vi>;
using vvl = vector<vl>;

const int MOD = 1e9 + 7;
//const int MOD = 998244353;
const ll INF = 1e9 + 7;
const ll  INFL = 1e18;
const double PI = 3.14159265359;

template<class T> bool chmax(T &a, const T &b) { if(a < b) { a = b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if(a > b) { a = b; return true; } return false; }

int main()
{ 
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);

    ll N, Q; cin >> N >> Q;
    vl A(N); REP(i, N) cin >> A[i];    
    vl K(Q); REP(i, Q) cin >> K[i];

    sort(ALL(A));
    vl s;
    vl t;
    t.pb(0);
    if(A[0] != 1)
    {
        s.pb(1);
        t.pb(A[0]-1);
    }
    REP(i, N-1)
    {
        if(A[i]+1 != A[i+1]) s.pb(A[i]+1), t.pb(A[i+1]-A[i]-1);
    }
    s.pb(A[N-1]+1);
    t.pb((ll)2e18);

    
    REP(i, (int)t.size()-1) t[i+1] += t[i];

    REP(i, Q)
    {
        int idx = lower_bound(ALL(t), K[i]) - t.begin() -1;
        cout << s[idx]+K[i]-1-t[idx] << endl;
    }
}