#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <string>
#include <numeric>
#include <ctype.h>
#include <limits>
#include <iomanip>

#define rep(i,n) for (int i = 0; i < n; i++)
#define all(x) (x).begin(),(x).end()
using namespace std;

typedef long long ll;

int main()
{
	int n, q;
	cin >> n >> q;
	vector<ll>a(n);
	rep(i, n)cin >> a[i];
	sort(all(a));
	ll k;
	rep(i, q) {
		cin >> k;
		ll ans;
		ll l = k - 2;
		ll r = k + n + 2;
		ll c;
		while (l + 1 < r) {
			c = (l + r) / 2;
			auto itr = upper_bound(all(a), c);
			if (c - ll(itr - a.begin())>= k)r = c;
			else l = c;
		}
		ans = r;
		cout << ans << endl;
	}
	return 0;
}
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  int n, q;
  cin >> n >> q;
  vector<ll> a(n + 1);
  for (int i = 1; i <= n; i++) cin >> a[i];
  a.push_back(2e18);
  vector<ll> s(n + 2);
  rep(i, n + 1) {
    s[i + 1] = s[i] + a[i + 1] - a[i] - 1;
  }
  rep(i, q) {
    ll k;
    cin >> k;
    auto itr = lower_bound(s.begin(), s.end(), k) - s.begin();
    itr--;
    k -= s[itr];
    ll ans = a[itr] + k;
    cout << ans << endl;
    //cout << s[itr] << endl;
  }
  return 0;
}