#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,a) for(int i=0;i<(a);i++)
const ll MOD=1000000007;

int N,Q;
ll A[101010],sum[101010],sumE[101010],sumO[101010];

int main(){
  cin>>N>>Q;
  for(int i=1;i<=N;i++){
    cin>>A[i];
    sum[i]=sum[i-1]+A[i];
    sumE[i]=sumE[i-1]+(i%2==0?A[i]:0);
    sumO[i]=sumO[i-1]+(i%2?A[i]:0);
  }
  while(Q--){
    int X; cin>>X;
    ll res=0;
    int ok=0,ng=N+1;
    while(abs(ng-ok)>1){
      int mid=(ok+ng)/2;
      int l=N-mid+1,r=N-mid/2+(mid%2==0);
      if(abs(A[l]-X)<=(abs(A[r]-X))) ok=mid;
      else ng=mid;
    }
    // 上からok個まで、あとは偶奇
    int r=N-ok/2+(ok%2==0),l=N-ok+1;
    if(r==l){
      if(N%2) cout<<sumO[N]<<endl;
      else cout<<sumE[N]<<endl;
      continue;
    }
    res=sum[N]-sum[r-1];
    if((l-1)%2){
      if(ok%2) res+=sumE[l-1];
      else res+=sumO[l-1];
    }else{
      if(ok%2) res+=sumO[l-1];
      else res+=sumE[l-1];
    }
    cout<<res<<endl;
  }
  return 0;
}
