n,k=map(int,input().split()) a=list(map(int,input().split())) now=sum(a[0:k]) s=[now] for i in range(1,n-k+1): now+=a[i+k-1] now-=a[i-1] s.append(now) import bisect s.sort() q=int(input()) for _ in range(q): x=int(input()) ans=bisect.bisect_right(s,x) print(ans)