#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <queue>
#include <vector>
#include <utility>
#define maxn 100005
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int n,Q,a[maxn];
struct Query{
	int val,id;
	bool operator < (const Query &b)const
	{
		return val > b.val;
	}
}q[maxn];
ll ans[maxn],sum[maxn],sumodd[maxn];
bool check(int pos,int x){
	if(a[pos] >= x) return false;
	int pos2 = pos + ((n - pos) >> 1);
	return a[pos2] - x < x - a[pos];
}
int main(){
	scanf("%d%d",&n,&Q);
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
		sum[i] = sum[i - 1] + a[i];
		sumodd[i] = sumodd[i - 1] + ((n - i + 1) & 1) * a[i];
	}
	int x = n;
	for(int i=1;i<=Q;i++){
		scanf("%d",&q[i].val);
		q[i].id = i;
	}
	sort(q + 1,q + Q + 1);
	for(int i=1;i<=Q;i++){
		if(a[n] <= x) ans[q[i].id] = sumodd[n];
		else{
			while(x > 0 && !check(x,q[i].val)) x -= 2;
			if(x == 0) ans[q[i].id] = sum[n] - sum[n >> 1];
			else ans[q[i].id] = sum[n] - sum[x + ((n - x) >> 1)] + sumodd[x];
		}
	}
	for(int i=1;i<=Q;i++){
		printf("%lld\n",ans[i]);
	}
	return 0;
}
