from bisect import bisect_right N,K = map(int,input().split()) A = list(map(int,input().split())) S = [] cnt = sum(A[:K]) S.append(cnt) for i in range(1,N-K+1): cnt = cnt-A[i-1]+A[i+K-1] S.append(cnt) S = sorted(S) Q = int(input()) for _ in range(Q): x = int(input()) print(bisect_right(S,x))