#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define vi vector<int>
#define vvi vector<vector<int>>
#define pb push_back
#define pii pair<ll,ll>
#define tii tuple<ll,ll,ll>
#define all(v) (v).begin(),(v).end()
#define ll long long
#define ull unsigned long long
#define fastio ios_base::sync_with_stdio(false);cin.tie(nullptr);
#define ld long double
#define mod 1000000007
#define PI 3.141592653589793238
#define eps 1e-9
#define endl "\n"
using namespace std;
using namespace __gnu_pbds;
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;   

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int getRand(int l, int r)
{
    return uniform_int_distribution<int>(l, r)(rng);
}

void run_case() {
    ll n, q;
    cin>>n>>q;

    vector<ll> vec(n+1, 0);
    for(int i = 1; i <= n; ++i)
        cin>>vec[i];

    vector<ll> dif;
    for(int i = 0; i < n; ++i) 
        dif.push_back(vec[i+1] - vec[i] - 1);

    vector<ll> pref(n);
    pref[0] = dif[0];
    for(int i = 1; i < dif.size(); ++i) 
        pref[i] = pref[i-1] + dif[i];

    // for(auto& it : pref) cout<<it<<" ";
    // cout<<endl;

    while(q--) {
        ll k;
        cin>>k;

        auto it = lower_bound(all(pref), k);

        ll diff = 0;
        if(it != pref.begin()) {
            auto it2 = prev(it);
            diff = *it2;
        }

        ll ind = it - pref.begin();
        ll now = k - diff;
        
        if(it == pref.end()) {
            cout<<now + vec[ind]<<endl;
        }
        else {
            cout<<now + vec[ind]<<endl;
        }
    }
}

int32_t main()  {
    fastio
    int t = 1;
    //cin>>t;
    for(int i = 0; i < t; ++i) {
        run_case();  
    }
}
#include <bits/stdc++.h>
using namespace std;

using ll = long long;

#define re(i,n)     for(int i = 0 ; i <  n ; i++)
#define rep(i,a,b)  for(int i = a ; i <= b ; i++)
#define rer(i,b,a)  for(int i = b ; i >= a ; i--)

#define debug(x) cout << #x << " : " << x << '\n';

const int N = (int)2e3+3;

int main(){
	ios_base::sync_with_stdio(false),cin.tie(nullptr);

	int n ,q; cin >> n >> q ;

	vector <ll> a(n);
	re(i,n) cin >> a[i];

	vector<ll>gaps(n);
	re(i,n) {
		gaps[i] = a[i] - (i + 1);
	}
	while(q--) {
		ll k ; cin >> k;

		if( k < a[0] ) {
			cout << k << "\n";
		}else if( a[0] <= k && k <= a[n-1]) {
			int idx = lower_bound(gaps.begin(),gaps.end(),k)-gaps.begin();
			if(idx == n)
				cout << a[n - 1] + (k - gaps[n - 1]) << "\n";
			else cout << a[idx] - gaps[idx] + k - 1 << "\n";
		}else {
			cout << n + k << "\n";
		}
	}

	return 0;
}