#include <cstdio>
#include <algorithm>
#include <vector>
#define mp make_pair 
#define x first
#define y second
#define ll long long
using namespace std;

ll n,q,ans,ps_o[50005],ps_e[50005],a[100005],ps[100005],l,r,mid,num,p,p2; 
int main(){
	scanf("%lld%lld",&n,&q);
	for (int i=1;i<=n;i++){
		scanf("%lld",&a[i]);
		if (i%2 == 0)
		ps_e[i/2]=ps_e[i/2-1]+a[i];
		else
		ps_o[i/2+1]=ps_o[i/2]+a[i]; 
		ps[i]=ps[i-1]+a[i];
	}
	for (int i=1;i<=q;i++){
		scanf("%lld",&num);
		l=0; r=n/2;
		while (l <= r){
			mid=(l+r)/2;
			if (abs(a[n-mid+1]-num) >= abs(num-a[n-mid*2+1]))
			l=mid;
			else
			r=mid;
			if (r-l <= 1){
				if (abs(a[n-r+1]-num) >= abs(num-a[n-r*2+1]))
				p=r;
				else
				p=l;
				break;
			}
		
		}
		ans=ps[n]-ps[n-p];
		if (abs(num-a[n-p]) >= abs(num-a[n-p*2]) && n-p*2 > 0){
			ans+=a[n-p];
			p2=n-p*2-1;
				if (p2%2 == 0)
				ans+=ps_o[p2/2];
				else
				ans+=ps_e[p2/2];
		}
		else
		{ 
			p2=n-p*2;
			if (p2%2 == 0)
			ans+=ps_e[p2/2];
			else
			ans+=ps_o[p2/2+1];
		}
		printf("%lld\n",ans);
	}
	return 0;
}		