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 = set() s.add(aa_sum) for i in range(n-k): s.add(aa_sum - a[i] + a[k+i]) aa_sum = aa_sum - a[i] + a[k+i] s = sorted(list(s)) q = int(input()) for _ in range(q): m = int(input()) print(bisect_right(s,m))