from bisect import bisect_right n,k = map(int,input().split()) a = list(map(int,input().split())) aa = a[:k] aa_sum = sum(aa) s = [] s.append(aa_sum) for i in range(n-k): s.append(aa_sum - a[i] + a[k+i]) aa_sum = aa_sum - a[i] + a[k+i] s.sort() q = int(input()) for _ in range(q): m = int(input()) print(bisect_right(s,m))