N,K=map(int,input().split()) a=[int(x) for x in input().split()] S=[0]*(N-K+1) S[0]=sum(a[:K]) for i in range(1,len(S)): S[i]=S[i-1]-a[i-1]+a[K+i-1] S.sort() Q=int(input()) for i in range(Q): x=int(input()) u=len(S) v=-1 while u-v>1: m=(u+v)//2 if S[m]<=x: v=m else: u=m print(v+1)