#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define M 100005
LL A[M],sum[M],K;
int main(){
	int n,q;
	cin>>n>>q;
	A[0]=0;
	for(int i=1;i<=n;i++){
		scanf("%lld",&A[i]);
		sum[i]=sum[i-1]+A[i]-A[i-1]-1;		
	}
	sum[n+1]=2e18-A[n]; 
	cout<<endl;
	while(q--){
		scanf("%lld",&K);
		int L=1,R=n+1,res;
		while(L<=R){
			int mid=(L+R)>>1;
			if(sum[mid]>=K){
				R=mid-1;res=mid;
			}else L=mid+1;
		}
		printf("%lld\n",A[res-1]+K-sum[res-1]);
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define vt vector
#define pb push_back
#define mp make_pair
#define rep(i, n) for (int i = 0; i < n; i++)
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))

// 🚩
// 20210306 21:02:45~
//
int main()
{
    ll A, B;
    cin >> A >> B;
    ll C = A + B;
    ll ans = 0;
    if (C >= 15 && B >= 8)
    {
        ans = 1;
    }
    else if (C >= 10 && B >= 3)
    {
        ans = 2;
    }
    else if (C >= 3)
    {
        ans = 3;
    }
    else
    {
        ans = 4;
    }
    cout << ans << endl;
}
