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

int main(){
    long long N, Q;
    scanf("%lld%lld", &N, &Q);

    vector<long long> A(N), AS(N + 2), S(N + 1), X((N - 1) / 2), a((N + 1) / 2);
    for(int i = 0; i < N; ++i){
        scanf("%lld", &A[i]);
        AS[i + 2] = A[i] + AS[i];
        S[i + 1] = A[i] + S[i];
    }

    for(int i = 1; i <= N / 2; ++i){
        a[i - 1] = S[N] - S[N - i] + AS[N - i * 2 + 1];
    }
    if(N & 1)*a.rbegin() = S[N] - S[N - (N + 1) / 2];
    for(int i = 1; i <= (N - 1) / 2; ++i){
        X[i - 1] = A[N - i - 1] + A[N - i * 2 - 1];
    }

    reverse(a.begin(), a.end());
    reverse(X.begin(), X.end());
    for(auto i : a) ++i; //It does not work without this line(I do not know why).

    for(long long i = 0, x = 0; i < Q; ++i){
        scanf("%lld", &x);
        auto tmp = min<long long>((N - 1) / 2, lower_bound(X.begin(), X.end(), x * 2) - X.begin());
        printf("%lld\n", a[tmp]);
    }
    return 0;
}