#include<bits/stdc++.h>
#define MP make_pair
#define PB push_back
#define rep(i,n) for(int(i)=0;(i)<(int)(n);++(i))
#define v vector
#define r return
/*
	Do-while:do {
	} while();
	endif:#ifndef 
	#endif
*/
using namespace std;
typedef long long ll;
string ss,st,tt,ts,s,t;
ll b,c,d,n,m,q,k;
struct pc{
	int ddd,ffg,eheu;
};
v<int> w;
const int maxn=1000005;
ll a[maxn];
double fd;
bool fl1,fl2,fl3,fl;
signed main(){
	cin>>n>>q;
	rep(i,n){
		cin>>a[i];
		a[i]-=i;
	}
	while(q--){
		cin>>k;
		cout<<k+upper_bound(a,a+n,k)-a<<"\n";
	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define Rep(i,n) for(int i=0;i<=(int)n;i++)
const ll mod = 1e9+7 ;
const ll INF = 1e18 ;
ll gcd(long long a,long long b){if(b==0) return a ; return gcd(b,a%b) ;}
ll lcm(long long a,long long b){return a/gcd(a,b)*b ;}

int main(){
    ll n, q;
    cin >> n >> q;
    vector<ll> a(n);
    rep(i,n) cin >> a.at(i);
    vector<pair<ll,ll>> b(n + 1);
    ll pos = 0;
    rep(i,n) {
        b.at(i).second = pos;
        b.at(i).first = a.at(i) - pos - 1;
        pos = a.at(i);
    }
    b.at(n).second = a.at(n - 1);
    for(int i = 1; i < n + 1; i++) {
        b.at(i).first += b.at(i - 1).first;
    } 
    rep(i,q) {
        ll k;
        cin >> k;
        ll l = -1;
        ll r = n + 1;
        ll mid;
        while(l + 1 < r) {
            mid = (l + r) / 2;
            if(b.at(mid).first >= k) r = mid;
            else l = mid;
        }
        if(r == 0) {
            cout << k << endl;
            continue;
        }
        if(r == n + 1) {
            cout << a.at(n - 1) + k - b.at(n).first << endl;;
            continue;
        }
        cout << b.at(r).second + k - b.at(r - 1).first << endl;
    }
}