#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;

int main(){
  ll n,q,x;
  cin >> n >> q;
  ll a[n];
  for(int i=0;i<n;i++) cin >> a[i];
  ll m=(n+1)/2;
  ll sum[m];
  sum[m-1]=0;
  for(int i=n-1;i>=0;i-=2) sum[m-1]+=a[i];
  for(int i=m-2;i>=0;i--){
    sum[i]=sum[i+1]-a[n-1-2*(m-1-i)]+a[n-1-(m-1-i)];
  }
  ll dis[m+1];
  dis[0]=-1e10,dis[m]=1e10;
  for(int i=m-1;i>=1;i--){
    dis[i]=(a[n-1-(m-i)*2]+a[n-1-(m-i)])/2+1;
  }
  for(int i=0;i<q;i++){
    cin >> x;
    ll p=upper_bound(dis,dis+m+1,x)-dis;
    cout << sum[p-1] << endl;
  }
}