#include <iostream>
#include <vector>
#include <map>
#include <algorithm>

using namespace std;
typedef long long ll;

ll n,q;
ll a[100005];
ll x[100005];
ll sum[100005];
ll ta[100005];
map<ll,ll> ans;

int main() {
  cin >> n >> q;
  int j = 0;
  if(n & 1) {
    j++;
    n++;
  }
  
  for(; j < n; j++) cin >> a[j];
  for(int i = 0; i < q; i++) cin >> x[i];

  if(n == 2) {
    for(int i = 0; i < q; i++) {
      cout << a[1] << endl;
    }
    return 0;
  }
  
  sum[0] = a[0];
  for(int i = 1; i < n; i++) sum[i] = sum[i-1] + a[i];
  ta[1] = a[1];
  for(int i = 3; i < n; i+=2) ta[i] = ta[i-2] + a[i];

  //for(int i = 0; i < n; i++) cout << sum[i]<<"  ";
  //cout << endl;
  // for(int i = 0; i < n; i++) cout << ta[i] <<"   ";
  //cout << endl;
			      

  for(int i = n - 2; i >= n/2; i--) {
    int tmp = (a[i] + a[2*i-n+1]) / 2;
    tmp++;
    ll T = sum[n-1] - sum[i] + ta[2*i-n+1];
    ans[tmp] = T;
  }
  ans[0] = sum[n-1] - sum[(n-1)/2];

  /* for(auto itr = ans.begin(); itr != ans.end(); ++itr) {
    cout << itr->first <<"   "<<itr->second << endl;
    }*/

  for(int i = 0; i < q; i++) {
    auto itr = ans.upper_bound(x[i]);
    itr--;
    cout << itr->second << endl;
  }
}
