#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#define rep(i,a,b) for (int i = (a); i < (b); i++)
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> P;
typedef complex<double> com;
const int mod = 1e9 + 7;
const int MOD = 998244353;
const int inf = 2e9;



int main() {
	int n,q; cin>>n>>q;
	vector<int> a(n);
	rep(i,0,n) cin>>a[i];
	reverse(a.begin(),a.end());
	vector<ll> sum(n+1,0),even(n+1,0);
	rep(i,0,n){
		sum[i+1]=sum[i]+a[i];
		even[i+1]=even[i]+(i%2==0?a[i]:0);
	}
	vector<ll> idx,val;
	rep(i,0,(n-1)/2){
		ll j=(a[i+1]+a[2*i+2])/2+1;
		ll k=(sum[i+1]-sum[0])+(even[n]-even[2*i+2]);
		idx.push_back(j);
		val.push_back(k);
	}
	reverse(idx.begin(),idx.end());
	reverse(val.begin(),val.end());
	rep(i,0,q){
		ll x; cin>>x;
		int ite=upper_bound(idx.begin(),idx.end(),x)-idx.begin();
		if(ite==0) printf("%lld\n",sum[(n+1)/2]-sum[0]);
		else printf("%lld\n",val[ite-1]);
	}
 	return 0;
}
