DBG = !true
n,q = gets.split.map{|x| x.to_i}
a = gets.split.map{|x| x.to_i}
xx = []
for i in 0...q
  xx << gets.to_i
end
if DBG
  print "n #{n} q #{q} x: "
  print xx
  puts ""
  print "a: "
  print a
  puts ""
end

sum = 0
acc = []
eoacc = Array.new(n+2)
for i in 0...n
  sum += a[i]
  acc << sum
end
esum = 0
osum = 0
for i in 0..(n/2)
  break if 2*i == n
  esum += a[2*i]
  eoacc[2*i] = esum
  break if 2*i+1 == n
  osum += a[2*i+1]
  eoacc[2*i+1] = osum
end

for x in xx
  # decide T by binary search
  puts "x #{x} start" if DBG
  if n <= 2
    puts "#{a[n-1]}"
    next
  elsif n <= 4
    if DBG
      puts "x #{x} an2 #{a[n-2]} an3 #{a[n-3]} mid #{(a[n-2]+a[n-3])/2}"
    end
    puts "#{a[n-1] + (x>(a[n-2]+a[n-3])/2 ? a[n-3] : a[n-2])}"
    next
  elsif 2*x > (a[n-2]+a[n-3])
    puts "#{eoacc[n-1]}"
    next
  end
  bot = 1
  ceil = (n-1)/2
  while ceil - bot > 1
    t = (bot + ceil)/2
    y = a[n-t] + a[n-2*t+1]
    z = a[n-t-1] + a[n-2*t-1]
    if y >= 2*x
      bot = t
    elsif 2*x > z
      ceil = t
    end
    if DBG
      puts "t #{t} y #{y} z #{z} bot #{bot} ceil #{ceil} 2x #{2*x}"
      puts "   ant #{a[n-t]} an2tp1 #{a[n-2*t+1]}"
      puts "   ant1 #{a[n-t-1]} an2tm1 #{a[n-2*t-1]}"
    end
  end
  ans = -1
  puts "now bot #{bot}" if DBG
  for t in [bot-3, 1].max..[bot+3,(n+1)/2-1].min
    puts "t=#{t}" if DBG
    y = a[n-t] + a[n-2*t+1]
    z = a[n-t-1] + a[n-2*t-1]
    if y >= 2*x && 2*x > z
      ans = t
      break
    end
  end
  puts "ANSWER: #{ans}" if DBG

  if ans == -1
    val = acc[n-1] - acc[n/2 - 1]
  else
    puts "n/2 #{n/2} ans #{ans} eacc #{eacc[n/2-ans]}" if DBG
    val = acc[n-1] - acc[n-ans-1] + eoacc[n - 2*ans - 1]
  end
  puts "#{val}"
end
