

#include <bits/stdc++.h>

#define loop(s, e, i) for (int i = s; i < e; ++i)
#define print(s) cout << s << endl;
#define DIV 1000000007
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
const ll INF = 1e18+7;

ll ceildiv(ll a, ll b) { return (a+b-1)/b; } // 切り上げ
ll floordiv(ll a, ll b) { return a/b; } // 切り下げ

int show_matrix(vector<vector<int>> &dp) {
  loop(0, dp.size(), i) {
    loop(0, dp[i].size(), j) {
      cout << dp[i][j] << " ";
    }
    cout << endl;
  }
  return 0;
}

/*
浮動小数点の入力
cout << fixed << setprecision(9) << endl;
*/

int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);

  ll N, Q;
  cin >> N >> Q;

  vector<ll> A(N);
  vector<ll> C(N);

  ll prev = -1;
  ll last = 0;
  loop(0, N, i) {
    ll a, b;
    cin >> a;
    b = a - (i+1);
    A[i] = a;
    C[i] = b;
  }

  loop(0, Q, i) {
    ll K;
    cin >> K;
    ll pos = lower_bound(C.begin(), C.end(), K) - C.begin();
    // print(pos
    // posまでに出現
    
    ll idx;
    ll v;
    if (pos == 0) {
      idx = 0;
      v = 0;
    } else{
      idx = C[pos -1];
      v = A[pos-1];
    }
    print(v + K - idx);
  }
}

#include<bits/stdc++.h>
using namespace std;
long long n,a;
int main()
{
	cin>>n>>a;
	for(int i=1;i<=a;i++)
	{
		if(n%200==0)
		n=n/200;
		else n=n*1000+200; 
	}
	cout<<n;
}