#include<bits/stdc++.h>
using ll = long long int;
using namespace std;
#define sync ios_base::sync_with_stdio(false); cin.tie(NULL) 
using ld = long double;
#define input(arr,n) for(ll i1=0;i1<n;i1++ )cin>>arr[i1]
#define mod 1000000007
#define F first
#define S second 
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
//recursions\
#pragma comment(linker, "/stack:200000000")
//loops\
#pragma GCC optimize("unroll-loops")
using namespace __gnu_pbds;
#define ordered_set tree<ll, null_type,less_equal<ll>, rb_tree_tag,tree_order_statistics_node_update>//s.order_of_key(val)->(strictly less than val) *s.find_by_order(ind)
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

vector<string> split(const string& s, char c) {
    vector<string> v; stringstream ss(s); string x;
    while (getline(ss, x, c)) v.push_back(x); return move(v);
}
template<typename T, typename... Args>
inline string arrStr(T arr, int n) {
    stringstream s; s << "[";
    for(int i = 0; i < n - 1; i++) s << arr[i] << ",";
    s << arr[n - 1] << "]";
    return s.str();
}
#define EVARS(args...) {__evars_begin(__LINE__); __evars(split(#args, ',').begin(), args);}
inline void __evars_begin(int line) { cerr << "#" << line << ": "; }
template<typename T> inline void __evars_out_var(vector<T> val) { cerr << arrStr(val, val.size()); }
template<typename T> inline void __evars_out_var(T* val) { cerr << arrStr(val, 10); }
template<typename T> inline void __evars_out_var(T val) { cerr << val; }
inline void __evars(vector<string>::iterator it) { cerr << endl; }
template<typename T, typename... Args>
inline void __evars(vector<string>::iterator it, T a, Args... args) {
    cerr << it->substr((*it)[0] == ' ', it->length()) << "=";
    __evars_out_var(a);
    cerr << "; ";
    __evars(++it, args...);
}
const int N = 1e6 + 5;

int main()
{
	sync;
	clock_t clk = clock();
    int n, q;
    cin >> n >> q;
    vector<ll> arr(n);
    input(arr, n);
    sort(arr.begin(), arr.end());
    while(q--){
        ll x, ans = -1;
        cin >> x;
        ll low = 1, high = 1e18 + 1e9;
        while(low <= high){
            ll mid = (low + high) / 2;
            ll curr = mid - (upper_bound(arr.begin(), arr.end(), mid) - arr.begin());
            if(curr >= x){
                ans = mid;
                high = mid - 1;
            }
            else
                low = mid + 1;
        }
        cout << ans << "\n";
    }


 	//cerr << '\n'<<"Time (in s): " << double(clock() - clk) * 1.0 / CLOCKS_PER_SEC << '\n';	
}

#include <iostream>
#include <string.h>
#include <string>
#include <cmath>
#include<vector>
#include <algorithm>
#include <iterator>
#include <map>  
#include <utility>
#include<numeric>
#include <iomanip>
#include <set>
#define ul unsigned long long int
#define sll signed long long int
#define ll long long int
#define pb push_back
 
using namespace std;
ll meh=1000000000+7;
ll gcd(ll a , ll b)
{
   if(b==0) return a;
   a%=b;
   return gcd(b,a);
}
  
ll levi(ll n , ll k)
{
    if (n%k==0)
    {
        return n/k;
    }
    else
    {
        return (((n-(n%k))/k));
    }
    
}
ll mex(ll a,ll b){
    if (a>=b)
    {
        return a;
    }
    else{
        return b;
    }
    
}
ll men(ll a,ll b){
    if (a<=b)
    {
        return a;
    }
    else{
        return b;
    }
    
}
ll sumdi(ll n){
    if (n<10)
    {
        return n;
    }
    else
    {
        return (n%10)+sumdi((n-(n%10))/10);
    }
    
    
}
ll diff(ll a,ll b){
    if (a>=b)
    {
        return a-b;
    }
    else{
        return b-a;
    }
    
}
ll expoi(ll a,ll n){
    if (n==0)
    {
        return 1;
    }
    else{
        return a*expoi(a,n-1);
    }
    
}
ll divi(ll n,ll k){
    if (n>=0)
    {
        return n%k;
    }
    
    return k+(n%k);
    
}
ll rolo(ll n, ll k) {
  vector<ll> aSolutions(k);
  aSolutions[0] = n - k + 1;

  for (ll i = 1; i < k; ++i) {
    aSolutions[i] = (aSolutions[i - 1] * (n - k + 1 + i) / (i + 1))%(meh);
  }

  return aSolutions[k - 1]%(meh);
}
ll asb(ll n){
    if (n>=0)
    {
        return n;
    }
    else{
        return -n;
    }
    
}
void DFS(vector<vector<ll>> adj, ll v, vector<bool> &vis)
{
    vis[v] = true;
    for (ll i : adj[v])
    {
        if (vis[i] == false)
        {
            DFS(adj, i,vis);
        }
    }
}


 


  

int main()
{
    ll n,q;
    cin>>n>>q;
    vector<ll> arr(n);
    vector<ll> quer(q);
    for (ll i = 0; i < n; i++)
    {
        cin>>arr[i];
    }
    for (ll i = 0; i < q; i++)
    {
        cin>>quer[i];
    }
    vector<ll> diff(n);
    for (ll i = 0; i < n; i++)
    {
        diff[i]=arr[i]-i-1;
    }
    for (ll i = 0; i < q; i++)
    {
        ll fi=lower_bound(diff.begin(),diff.end(),quer[i])-diff.begin();
        if (fi<n)
        {
            if (fi>0)
            {
                cout<<arr[fi-1]+quer[i]-diff[fi-1]<<endl;
            }
            else
            {
                cout<<quer[i]<<endl;
            }
            
            
        }
        else{
            ll idk=quer[i]-diff[n-1];
            cout<<arr[n-1]+idk<<endl;
        }
        
    }
    
    
    


        
    
    
        
    
    
    
    
    
    
    


    
        
    
    
    

    return 0;
}