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

//template
#define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define ALL(v) (v).begin(),(v).end()
using ll=long long int;
const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12;
template<typename T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<typename T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
//end



int main(){
   int n,q;
   cin>>n>>q;
   vector<ll> a(n+1,0);
   rep(i,1,n+1)cin>>a[i];
   vector<ll> rui(n+1,0);
   rep(i,0,n){
      rui[i+1]=rui[i]+(a[i+1]-a[i]-1);
   }

   while(q--){
      ll x;
      cin>>x;
      int idx=lower_bound(ALL(rui),x)-rui.begin()-1;
      x-=rui[idx];
      cout<<a[idx]+x<<'\n';
   }
   return 0;
}
#include<stdio.h>

int main(){
  long int n, q, a[100005], k[100005];
  scanf("%ld %ld", &n, &q);
  
  for(int i = 0; i < n; i++){
    scanf("%ld", &a[i]);
    a[i] -= i;
  }
  
  for(int i = 0; i < q; i++){
    scanf("%ld", &k[i]);
  }
  
  long int mid, left, right;
  for(int i = 0; i < q; i++){
    left = -1;
    right = n;
    mid = (left + right) / 2;
    while((right - left) > 1){
      if(k[i] < a[mid]){
        right = mid;
      }else{
        left = mid;
      }
      mid = (right + left) / 2;
    }
    printf("%ld\n", k[i] + right);    
  }
  return 0;
}