from bisect import bisect_right def main(): N, K = map(int, input().split()) a = list(map(int, input().split())) range_sum = [] for i in range(N-K+1): if not range_sum: range_sum.append(sum(a[:K])) else: range_sum.append(range_sum[-1] + a[i+K-1] - a[i-1]) range_sum.sort() for _ in range(int(input())): x = int(input()) print(bisect_right(range_sum, x)) if __name__ == "__main__": main()