#include<bits/stdc++.h>
#define show(x) cerr << #x << " = " << x << '\n';
using namespace std;
#define int long long
#pragma GCC optimize(2)

int n, q;
vector<int> a;
void solve()
{
    cin >> n >> q;
    for(int i = 1; i <= n; i ++)
    {
        int t;
        cin >> t;
        a.push_back(t);
    }
    for(int i = 1; i <= q; i ++)
    {
        int m;
        cin >> m;
        int l = 0, r = 2e18;
        while(l < r)
        {
            int mid = l + r >> 1;
            int p = upper_bound(a.begin(), a.end(), mid) - a.begin() - 1;
            int x = mid - p;
            if(x <= m)
            {
                l = mid + 1;
            }
            else
            {
                r = mid;
            }
        }
        cout << l << '\n';
    }
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    solve();
}



/*NEVER GIVE UP*/
/*First try brute force and check if it is in the range of time complexity*/
/*Then try to solve the problem in mathematical form*/
/*Then try to imagine how the final ans will look like*/
/*Write on paper if still not able to get*/
/*Try to think diff. algorithms and data structures that could solve the problem*/
#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y, long long p) 
{ 
    long long res = 1;     // Initialize result 
 
    x = x % p; // Update x if it is more than or 
                // equal to p
  
    if (x == 0) return 0; // In case x is divisible by p;
 
    while (y > 0) 
    { 
        // If y is odd, multiply x with result 
        if (y & 1) 
            res = (res*x) % p; 
 
        // y must be even now 
        y = y>>1; // y = y/2 
        x = (x*x) % p; 
    } 
    return res; 
} 
int main()
{long long n=0,q=0,d=0,k=0;
    cin>>n>>q;
    long long a[n];vector<long long> dp(n);
    for(long long j=0;j<n;j++)
    cin>>a[j];
    sort(a,a+n);
    dp[0]=a[0]-1;
    for(long long j=1;j<n;j++)
    {
        dp[j]=dp[j-1]+(a[j]-a[j-1]-1);
    }
    for(long long j=0;j<q;j++)
    {
        cin>>k;
        d=lower_bound(dp.begin(),dp.end(),k)-dp.begin();
        if(d==n)
        cout<<a[n-1]+(k-dp[n-1])<<endl;
        else if(d==0)
        cout<<k<<endl;
        else
        {
            cout<<a[d]-dp[d]+k-1<<endl;
        }
    }
}

