#include <bits/stdc++.h>
using namespace std;
long long a[100100],gs[100100],ks[100100],s[100100];
int main()
{
	int i,n,q;
	long long x,ans;
	scanf("%d%d",&n,&q);
	for(i=0;i<n;i++)
		scanf("%lld",&a[i]);
	for(i=0;i<n;i++)
	{
		gs[i+1]=gs[i];
		ks[i+1]=ks[i];
		s[i+1]=s[i]+a[i];
		if(i%2==0)
			gs[i+1]+=a[i];
		else
			ks[i+1]+=a[i];
	}
	for(i=0;i<q;i++)
	{
		scanf("%lld",&x);
		int l=0,r=n,mid,tmp;
		while(l<r)
		{
			mid=(l+r)/2;
			tmp=lower_bound(a,a+n,x*2-a[mid])-a;
			if(mid-tmp<n-mid-1)
				l=mid+1;
			else
				r=mid;
		}
		ans=s[n]-s[l];
		if(n%2==0)
			ans+=ks[l*2-n];
		else
			ans+=gs[l*2-n];
		printf("%lld\n",ans);
	}
	return 0;
}