import bisect N,K=map(int,input().split()) A=[0]+list(map(int,input().split())) for i in range(1,N+1): A[i]+=A[i-1] S=[A[i+K]-A[i] for i in range(N-K+1)] S.sort() Q=int(input()) for q in range(Q): x=int(input()) ans=bisect.bisect_right(S,x) print(ans)