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

int main(){
    unsigned long N, Q;
    cin >> N >> Q;
    vector<unsigned long> A(N), AS(N + 2), S(N), X, a;
    for(auto& i : A)cin >> i;
    partial_sum(A.rbegin(), A.rend(), S.begin());
    for(unsigned long i{0}; i < N; ++i)AS[i + 2] = A[i] + AS[i];
    for(unsigned long i{(N + 1) / 2}; i--;)a.push_back(S[i] + AS[N - i * 2 - 1]);
    for(unsigned long i{(N + 1) / 2}; --i;)X.push_back(A[N - i - 1] + A[N - i * 2 - 1]);
    auto beg = begin(X), edn = end(X);
    for(long long i{0}, x; i < Q; ++i){
        cin >> x;
        cout << a[lower_bound(beg, edn, x * 2) - beg] << endl;
    }
    return 0;
}