#include <bits/stdc++.h>
using namespace std;

using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<int, int>;
using LL = long long;
using VL = vector<LL>;
using VVL = vector<VL>;
using PLL = pair<LL, LL>;
using VS = vector<string>;

#define ALL(a)  begin((a)),end((a))
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define MT make_tuple
#define SZ(a) int((a).size())
#define SORT(c) sort(ALL((c)))
#define RSORT(c) sort(RALL((c)))
#define UNIQ(c) (c).erase(unique(ALL((c))), end((c)))

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

#define FF first
#define SS second

template<class S, class T>
istream& operator>>(istream& is, pair<S,T>& p){
  return is >> p.FF >> p.SS;
}
template<class T>
istream& operator>>(istream& is, vector<T>& xs){
  for(auto& x: xs)
	is >> x;
  return is;
}
template<class S, class T>
ostream& operator<<(ostream& os, const pair<S,T>& p){
  return os << p.FF << " " << p.SS;
}
template<class T>
ostream& operator<<(ostream& os, const vector<T>& xs){
  for(unsigned int i=0;i<xs.size();++i)
	os << (i?" ":"") << xs[i];
  return os;
}
template<class T>
void maxi(T& x, T y){
  if(x < y) x = y;
}
template<class T>
void mini(T& x, T y){
  if(x > y) x = y;
}
void debug(istringstream&){}
template <char sep=',', class Head, class... Tail>
void debug(istringstream& iss, Head&& head, Tail&&... tail)
{
  string name;
  getline(iss, name, ',');
  cerr << sep << name << "=" << head;
  debug(iss, forward<Tail>(tail)...);
}
#define DEBUG(...) \
  do{ \
    istringstream ss(#__VA_ARGS__); \
    debug<' '>(ss, __VA_ARGS__); \
    cerr<<endl; \
  }while(0)

const double EPS = 1e-10;
const double PI  = acos(-1.0);
const LL MOD = 1e9+7;

int main(){
  cin.tie(0);
  ios_base::sync_with_stdio(false);

  int N, Q;
  cin >> N >> Q;
  VL xs(N);
  cin >> xs;

  VL acc(N+1);
  VL ev(N+1);
  REP(i,N) acc[i+1] = acc[i] + xs[i];
  REP(i,N) ev[i+1] = ev[i] + (i % 2 == 0 ? xs[i] : 0ll);

  auto cnt = [&](LL lb, LL ub){ // [lb,ub)
    auto l = lower_bound(ALL(xs), lb);
    auto r = lower_bound(ALL(xs), ub);
    return r - l;
  };

  while(Q--){
    LL X;
    cin >> X;

    int lb = 1, ub = N;
    while(ub - lb > 1){
      LL m = (lb + ub) / 2;
      LL ed = xs[N - m];
      LL c = cnt(X - abs(X - ed), ed);
      if(c >= m) lb = m;
      else ub = m;
    }

    // lb
    LL tk = acc[N] - acc[N-lb];

    int i1 = N - 1 - lb - lb;
    int i2 = N - 1 - lb;
    if(0 <= i1 && abs(X - xs[i1] <= abs(X - xs[i2]))){
      tk += xs[i2];
      int b = i1;
      if(b % 2 == 0){
        tk += ev[b];
      }
      else{
        tk += acc[b] - ev[b];
      }
    }
    else{
      int b = i1+1;
      if(b % 2 == 1){
        tk += ev[b];
      }
      else{
        tk += acc[b] - ev[b];
      }
    }
   // DEBUG(X, lb, i1, i2, tk);

#if 0    
    LL ed = xs[N - lb];
    LL c = cnt(X - abs(X - ed), ed);

    if(c == 0){
      int b = N - 1;
      if(b % 2 == 0){
        tk += ev[b];
      }
      else{
        tk += acc[b] - ev[b];
      }
    }
    else{
    if(c == lb){
      int b = N - 2*lb;
      if(b %2 == 1){
        tk += ev[b];
      }
      else{
        tk += acc[b] - ev[b];
      }
    }
    else{
      int i2 = N - 1 - lb;
      int i1 = i2 - lb;
      DEBUG(i1,i2);
      if(0 <= i1 && abs(X - xs[i1] <= abs(X - xs[i2]))){
        int b = N - 2*lb - 1;
        tk += xs[N - lb - 1];
        if(b > 0){
          if(b % 2 == 0){
            tk += ev[b];
          }
          else{
            tk += acc[b] - ev[b];
          }
        }
      }
      else{
        int b = N - 2*lb;
        if(b > 0){
          if(b % 2 == 1){
            tk += ev[b];
          }
          else{
            tk += acc[b] - ev[b];
          }
        }
      }
    }
    }
    DEBUG(lb,c, tk);
#endif
    cout << tk << endl;
  }

  return 0;
}


Measured memory_bytes: 4096