#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
    int N, Q; cin >> N >> Q;
    vector<long long> A(N);
    for (int i = 0; i < N; ++i) cin >> A[i];
    reverse(A.begin(), A.end()); // 考えやすいように左右反転

    vector<long long> sum(N+1), evensum(N+1); // 累積和、偶数番目累積和
    for (int i = 0; i < N; ++i) {
        sum[i+1] = sum[i] + A[i];
        evensum[i+1] = evensum[i] + (i % 2 == 0 ? A[i] : 0);
    }

    vector<long long> ths, vals; // ths: L の値が変化する x の境目、vals: またそのときの先手のスコア
    for (int i = 0; i < (N-1)/2; ++i) {
        long long th = (A[i+1] + A[i*2+2])/2 + 1;
        long long val = (sum[i+1] - sum[0]) + (evensum[N] - evensum[i*2+2]);
        ths.push_back(th); vals.push_back(val);
    }
    reverse(ths.begin(), ths.end()); reverse(vals.begin(), vals.end());
    for (int _ = 0; _ < Q; ++_) {
        long long x; cin >> x;
        int it = upper_bound(ths.begin(), ths.end(), x) - ths.begin(); // L の値が何かを求める
        if (it == 0) cout << sum[(N+1)/2] - sum[0] << endl;
        else cout << vals[it-1] << endl;
    }
}
