import numpy as np import bisect n, k = map(int,input().split()) A = list(map(int,input().split())) Q = int(input()) c = np.cumsum([0]+A) wide = c[k:] - c[:-k] wide.sort() for i in range(Q): x = int(input()) print(bisect.bisect_right(wide, x))