// #pragma comment(linker, "/stack:200000000000")
// #pragma GCC optimize("Ofast")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#include <bits/stdc++.h> 

using namespace std;
using i128 = __int128_t;
using u128 = __uint128_t;
using u64 = uint64_t;

//define
#define int long long
#define ll int
#define trav(i,v)   for(auto i: v)
#define rep(i,n)    for(int i=0;i<n;i++)
#define repu(i,k,n) for(int i=k;i<=n;i++)
#define repd(i,k,n) for(int i=k;i>=n;i--)
#define se second
#define fi first
#define pb push_back
#define mp make_pair
#define all(v)  v.begin(), v.end()
#define itn int 
#define sz(x) (int)x.size()
    
//typedef
typedef unsigned long long ull;
typedef long double ld;
typedef std::pair<int, int> pii;
typedef std::vector<int> vi;
typedef std::vector< pii > vii;
typedef std::vector< std::vector<int> > vvi;
typedef std::vector< std::pair < pii, int > > vpp;
 
const long long MOD = 1000000007;
// const long long MOD = 998244353;
const long double PI = 3.141592653589793238;
const long long pi = 31415926;
const long long inf = 1000000000000000000;
const long long small_inf = INT_MAX;
const int N = 500;

int modpow(int x, int n, int mod = MOD){ int res=1; while(n>0){ if(n&1) res=res*x%mod; x=x*x%MOD; n>>=1;} return res;}
int power(int x, int n){ int res=1; while(n>0){ if(n&1) res=res*x; x=x*x; n>>=1; } return res;}

void init(){

}

void solve()
{
/*Don't hurry, nothing good comes if you rush*/
	int n, q;
	cin>>n>>q;
	vi v(n,0);
	rep(i,n){
		cin>>v[i];
	}
	while(q--){
		itn k;
		cin>>k;
		int l = k, r = k+100005;
		while(l<r){
			int m = (l+r)/2;
			int pos = upper_bound(all(v), m) - v.begin();
			int m1 = m-pos;
			if(m1>=k)
				r = m;
			else
				l = m+1;
		}
		cout<<l<<endl;
	}
}

signed main(){
    // #ifndef ONLINE_JUDGE
    //    freopen("./input.txt", "r", stdin);
    //    freopen("./output.txt", "w", stdout);
    // #endif
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);

    int t23 = 1, tt23 = 1; 
    // cin>>t23;
    init();
    while(tt23<=t23)
    {
        // cout<<"Case #"<<tt23<<": ";
        solve();
        tt23++;
    }
    cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}   
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

void solve();
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
#ifdef INPUT_FILE
    auto fre = freopen(INPUT_FILE, "r", stdin);
    if (fre == nullptr) {
        cout << "invalid input file path: " << INPUT_FILE << endl;
        return 0;
    }
#endif
    solve();
#ifdef INPUT_FILE
    fclose(fre);
#endif
    return 0;
}

long a[100001];

// index of larget number <= target
int binary_search(int i, int j, long target) {
    while (i <= j) {
        int mid = (j - i) / 2 + i;
        if (target == a[mid]) {
            return mid;
        }
        if (target < a[mid]) {
            j = mid - 1;
        } else {
            i = mid + 1;
        }
    }
    return j;
}

void solve() {
    int n, q;
    while (cin >> n >> q) {
        for (int i = 1; i <= n; ++i) {
            cin >> a[i];
        }
        sort(a + 1, a + n + 1);
        for (int i = 0; i < q; ++i) {
            long k;
            cin >> k;
            int left = 1, right = n;
            do {
                int index = binary_search(left, n, k);
                if (index == left - 1) {
                    break;
                }
                k += index - left + 1;
                left = index + 1;
            } while (true);
            cout << k << endl;
        }
    }
}
