#include <bits/stdc++.h>
using namespace std;

///* input vector */
//template <typename T>
//istream& operator >>(istream& in, vector<T>& v) {
//    for (size_t i=0; i<v.size(); ++i) {
//        in >> v[i];
//    }
//    return in;
//}
///* output vector */
//template <typename T>
//ostream& operator <<(ostream& out, vector<T>& v) {
//    string sep = "";
//    for (size_t i=0; i<v.size(); ++i, sep=" ") {
//        out << sep << v[i];
//    }
//    return out;
//}

/* shortcuts */
#define all(v) begin(v),end(v)
#define rep(i,n) for(int i=0; i<n; ++i)
#define endl '\n'

/* data types shortened */
using ll = long long;
using ull = unsigned long long;
using uint = unsigned int;

int main()
{
    #define ONLINE_JUDGE
    #ifndef ONLINE_JUDGE
        freopen("Input.txt", "r", stdin);
        //freopen("Output.txt", "w", stdout);
        //freopen("Eroor.txt", "w", stderr);
    #endif // ONLINE_JUDGE

    int n, q; cin >> n >> q;
    vector<ull> a(n);
    rep(i,n) cin >> a[i];

    vector<ull> pre(n); // pre_sum: sum of nbr of included nbrs so far, index: zone
    rep(i,n) pre[i] = a[i]-i-1;

    while (q--) {
        ull k; cin >> k;
        int zone = lower_bound(all(pre), k) - pre.begin();
        ull ans;
        if (zone == 0) ans = k;
        else ans = a[zone-1]+(k-pre[zone-1]);
        cout << ans << endl;
    }

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,c,u;
	cin>>a>>c;
	for(int i=1;i<=a;i++)
	{
	cin>>u;
	if(u!=c)
	{
		cout<<u<<" ";
		}
	}
		return 0;
}