output_description: Print Q lines. The i-th line (1 \leq i \leq Q) should contain the answer for x
  = X_i.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N Q
      A_1 A_2 ... A_N
      X_1
      X_2
      :
      X_Q
attempt: def examA():
      N = I()
      ans = 0
      print(ans)
      return
  
  
  def examB():
      ans = 0
      print(ans)
      return
  
  
  def examC():
      ans = 0
      print(ans)
      return
  
  
  def examD():
      N, Q = LI()
      A = LI()
      X = [I() for _ in range(Q)]
      S = [0] * (N + 1)
      S_odd = [0] * (N + 1)
      S_even = [0] * (N + 1)
      for i in range(N):
          S[i + 1] = S[i] + A[i]
          S_odd[i + 1] = S_odd[i] + A[i] * (i % 2 == 0)
          S_even[i + 1] = S_even[i] + A[i] * (i % 2 == 1)
  
      ans = [0] * Q
      L = [inf] * N
      for i in range(N - 1):
          if i == 0:
              L0 = -inf
          else:
              L0 = A[i - 1]
          R0 = i + (N - i) // 2
          L[i] = L0 + R0 - 1
      # print(L)
      # print(S)
      # print(S_odd)
      # print(S_even)
  
      def calc_score(l, r):
          rep = S[N] - S[r]
          if (N - r - 1) > r - l:
              if l % 2 == 1:
                  rep += S_odd[l - 1]
              else:
                  rep += S_even[l - 1]
          else:
              if l % 2 == 1:
                  rep += S_even[l - 1]
              else:
                  rep += S_odd[l - 1]
          # print(rep)
          return rep
  
      for q in range(Q):
          # print(X[q])
          i = bisect.bisect_right(L, X[q])
          # print(i,i + (N-i-1)//2)
          ans[q] = calc_score(i, i + (N - i - 1) // 2)
  
      for v in ans:
          print(v)
      return
  
  
  def examE():
      ans = 0
      print(ans)
      return
  
  
  import sys, copy, bisect, itertools, heapq, math, random
  from heapq import heappop, heappush, heapify
  from collections import Counter, defaultdict, deque
  
  
  def I():
      return int(sys.stdin.readline())
  
  
  def LI():
      return list(map(int, sys.stdin.readline().split()))
  
  
  def LSI():
      return list(map(str, sys.stdin.readline().split()))
  
  
  def LS():
      return sys.stdin.readline().split()
  
  
  def SI():
      return sys.stdin.readline().strip()
  
  
  global mod, mod2, inf, alphabet, _ep
  mod = 10**9 + 7
  mod2 = 998244353
  inf = 10**18
  _ep = 10 ** (-12)
  alphabet = [chr(ord("a") + i) for i in range(26)]
  
  if __name__ == "__main__":
      examD()
  
  """
  
  """
  
problem_description: Statement
  
  There are N cards. The i-th card has an integer A_i written on it. For any two
  cards, the integers on those cards are different.
  
  Using these cards, Takahashi and Aoki will play the following game:
  
    * Aoki chooses an integer x.
    * Starting from Takahashi, the two players alternately take a card. The card should be chosen in the following manner:
      * Takahashi should take the card with the largest integer among the remaining card.
      * Aoki should take the card with the integer closest to x among the remaining card. If there are multiple such cards, he should take the card with the smallest integer among those cards.
    * The game ends when there is no card remaining.
  
  You are given Q candidates for the value of x: X_1, X_2, ..., X_Q. For each i
  (1 \leq i \leq Q), find the sum of the integers written on the cards that
  Takahashi will take if Aoki chooses x = X_i.
samples: [{"input": "5 5\n    3 5 7 11 13\n    1\n    4\n    9\n    10\n    13", "output": "31\n    31\n    27\n    23\n    23\n    \n\nFor example, when x = X_3(= 9), the game proceeds as follows:\n\n  * Takahashi takes the card with 13.\n  * Aoki takes the card with 7.\n  * Takahashi takes the card with 11.\n  * Aoki takes the card with 5.\n  * Takahashi takes the card with 3.\n\nThus, 13 + 11 + 3 = 27 should be printed on the third line.\n\n* * *"}, {"input": "4 3\n    10 20 30 40\n    2\n    34\n    34", "output": "70\n    60\n    60"}]