
#include <bits/stdc++.h>

#define null				""
#define all(dat)			dat.begin(), dat.end()
#define over(msg)			cout << msg << endl, exit(0);
#define loop(i, to)			for (int i = 0; i < to; ++i)
#define cont(i, to)			for (int i = 1; i <= to; ++i)
#define foreach(i, dat)		for (__typeof(dat.begin()) i = dat.begin(); i != dat.end(); ++i)

typedef long long			num;

using namespace std;

int n, q;
num a[100005], pre[100005], pres[2][100005], ans;

int main() {
	ios_base::sync_with_stdio(0);
	cin >> n >> q;
	loop (i, n) {
		cin >> a[i];
		pre[i + 1] = pre[i] + a[i];
		pres[i % 2][i + 1] = pres[i % 2][i] + a[i];
		pres[(i % 2) ^ 1][i + 1] = pres[(i % 2) ^ 1][i];
	}
	cont (cas, q) {
		num x, l = 0, r = n, mid;
		cin >> x;
		while (l < r) {
			mid = (l + r) >> 1;
			int pos = (int) (lower_bound(a, a + n, x - (a[mid] - x)) - a);
			if (mid - pos < n - mid - 1) {
				l = mid + 1;
			} else {
				r = mid;
			}
		}
		ans = pre[n] - pre[l] + pres[(n % 2) ^ 1][l - (n - l)];
		cout << ans << '\n';
	}
}
