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

bool check(long long k, long long middle, vector<vector<long long>> &b){
  if(k >= b[middle][2]){return (true);}
  else{return (false);}
}

int main(){
  int n, q; cin >> n >> q;
  vector<long long> a(n+1), k(q);
  for(int i = 0; i < n; ++i){cin >> a[i];}
  a[n] = 1LL<<60;
  
  vector<vector<long long>> b;
  long long s = 1, ccount = 1;
  for(int i = 0; i <= n; ++i){
    long long e = a[i];
    if(e - s == 0){s = e + 1;}
    else{
      vector<long long> tmp = {s, e-1, ccount};
      ccount += e - s;
      b.emplace_back(tmp);
      s = e + 1;
    }    
  }
  
  for(int i = 0; i < q; ++i){
    long long k; cin >> k;
    long long bottom = 0, top = b.size(), middle;
    while(top - bottom > 1){
      middle = (bottom + top)/2;
      if(check(k, middle, b) == true){bottom = middle;}
      else{top = middle;}
    }
    int p = bottom;
    cout << b[p][0] + k - b[p][2] << endl;
  }
}
#include <bits/stdc++.h>
using namespace std;

// https://www.geeksforgeeks.org/ordered-set-gnu-c-pbds/
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define rep(i,s,e) for(int i=s ; i < e ; i++)
#define rrep(i,s,e) for(int i=s ; i > e ; i--)
#define srep(i,s,e,j) for(int i=s ; i < e ; i+=j)
#define tr(i,x) for(auto i : x)
#define vinp(a) for(int i=0 ; i<a.size() ; i++)cin>>a[i]
#define ainp(a,n) for(int i=0; i<n; i++)cin>>a[i]
#define int long long
#define vi vector<int>
#define vs vector<string>
#define vb vector<bool>
#define vpi vector<pii>
#define maxpqi priority_queue<int>
#define minpqi priority_queue <int, vector<int>, greater<int> >
#define pii pair<int,int> 
#define F first
#define S second
#define mk make_pair
#define pb push_back
#define pf push_front
#define endl '\n'
#define gcd(a,b) __gcd(a,b)
#define clr(x) memset(x,0,sizeof(x))
#define fill(x,y) memset(x,y,sizeof(x))
#define lb lower_bound
#define ub upper_bound
#define npos string::npos
#define all(x) x.begin(),x.end()
#define sayyes cout << "YES" << endl
#define sayno cout << "NO" << endl

string a="ALICE",b="BOB";

void solve(){
    int n,q;cin>>n;cin>>q;
    int a[n+1];a[0]=0;
    int b[n+1];b[0]=0;
    rep(i,1,n+1){
        cin>>a[i];
        b[i] = a[i]-i;
    }
    // int q;cin>>q;
    while(q--){
        int k;cin>>k;
        // cout << "findng " << k << "th" << endl;

        // auto it = lb(b, b+)
        int pos = lb(b,b+n+1,k)-b;
        // cout << "pos : " << pos << endl;
        pos--;
        // cout << "pos--" << endl;    
        // cout << "b[pos] : " << b[pos] << endl;
        cout << a[pos]+k-b[pos] << endl;
        // cout << "--> " << a[pos]+k-b[pos] << endl;
    }
    // cout<<endl;  
}

int32_t main()
{
    fastio
    // freopen("input.txt","r",stdin);
    // freopen("output.txt","w",stdout);
    solve();
    return 0;
}
