#include<stdio.h>
int main() {
    long n, i, sum1[111111], sum2[111111], q, a[111111], b[111111], ans[111111], x;
    scanf("%ld%ld", &n, &q);
    for (i = 1; i <= n; i++)
        scanf("%ld", &a[i]);
    sum1[0] = 0;
    sum2[n + 1] = 0;
    for (i = 1; i <= n; i++) {
        if ((n - i) % 2 == 0)
            sum1[i] = sum1[i - 1] + a[i];
        else
            sum1[i] = sum1[i - 1];
        sum2[n + 1 - i] = sum2[n + 2 - i] + a[n + 1 - i];
    }
    for (i = n - 1; i >= n / 2; i--) {
        b[i] = (a[i] + a[i * 2 - n]) / 2;
    }
    long max, min, r;
    for (i = 0; i < q; i++) {
        scanf("%ld", &x);
        max = n - 1;
        min = n / 2;
        while (max != min) {
            r = (max + min) / 2;
            if (min == r)
                r++;
            if (x <= b[r]) {
                if (max == r)
                    max--;
                else
                    max = r;
            }
            else
                min = r;
        }
        if (min * 2 - n<0)
            ans[i] = sum2[min + 1];
        else
            ans[i] = sum1[min * 2 - n] + sum2[min + 1];
    }
    for (i = 0; i < q; i++)
        printf("%ld\n", ans[i]);
    return 0;
}