import std.stdio, std.conv, std.string, std.bigint;
import std.math, std.random, std.datetime;
import std.array, std.range, std.algorithm, std.container, std.format;
string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }


void main(){
	auto n = read.to!long;
	auto q = read.to!long;
	
	long[] as;
	foreach(i; 0 .. n) as ~= read.to!long;
	debug writeln("as: ", as);
	
	long[] bs;
	foreach_reverse(a; as) bs ~= a;
	debug writeln("bs: ", bs);
	
	long[] sums;
	foreach(i; 0 .. n){
		if(i == 0) sums ~= bs[i];
		else sums ~= sums[$ - 1] + bs[i];
	}
	debug writeln("sums: ", sums);
	
	long[] evensums;
	for(int i = 0; i * 2 < n; i ++){
		if(i == 0) evensums ~= bs[i * 2];
		else evensums ~= evensums[$ - 1] + bs[i * 2];
	}
	debug writeln("evensums: ", evensums);
	long evensum = evensums[$ - 1];
	debug writeln("evensum: ", evensum);
	
	long[] cs;
	for(int i = 0; i * 2 < n; i ++) cs ~= bs[i] + bs[i * 2];
	debug writeln("cs: ", cs);
	
	foreach(t; 0 .. q){
		auto x = read.to!long;
		auto i = uplimit(0, (n - 1) / 2, i => (x * 2 <= cs[i]));
		auto ans = sums[i] + evensum - evensums[i];
		debug writeln("x: ", x, " i: ", i, " ans: ", ans);
		ans.writeln;
	}
	
}


// fをみたす最大(二分探索; binary search)
long uplimit(long a, long c, bool delegate(long) f){
	if(f(c)) return c;
	if(! f(a)) return a - 1;
	while(a + 1 < c){
		long b = (a + c) / 2;
		if(f(b)) a = b;
		else c = b;
	}
	return a;
}
