#include <iostream>
#include <algorithm>
#include <stdlib.h>
#define llint long long

using namespace std;

llint n, Q;
llint a[100005], sum[100005];
llint osum[100005], esum[100005];

bool check(llint mid, llint x)
{
	if(x >= a[n-mid+1]) return false;
	int d = abs(a[n-mid+1] - x);
	int num = lower_bound(a+1, a+n+1, x+d) - lower_bound(a+1, a+n+1, x-d);
	return num >= mid-1;
}

int main(void)
{
	cin >> n >> Q;
	for(int i = 1; i <= n; i++) cin >> a[i];
	for(int i = 1; i <= n; i++) sum[i] = sum[i-1] + a[i];
	for(int i = 1; i <= n; i++){
		osum[i] = osum[i-1];
		esum[i] = esum[i-1];
		if(i%2) osum[i] += a[i];
		else esum[i] += a[i];
	}
	
	for(int q = 0; q < Q; q++){
		llint x;
		cin >> x;
		
		llint ub = n+1, lb = 0, mid;
		while(ub-lb>1){
			mid=(ub+lb)/2;
			if(check(mid, x)) lb = mid;
			else ub = mid;
		}
		
		llint ans = sum[n] - sum[n-lb];
		if(n%2) ans += osum[n-2*lb];
		else ans += esum[n-2*lb];
		cout << ans << endl;
	}
}