N,K = map(int,input().split()) a = list(map(int,input().split())) S = [] ans = 0 for i in range(K): ans += a[i] S.append(ans) j = 1 while j + K -1 < N: ans = S[-1] + a[j+K-1] - a[j] S.append(ans) j += 1 S.sort() Q = int(input()) for _ in range(Q): x = int(input()) if S[-1] <= x: print(len(S)) else: end = len(S) - 1 start = -1 while end - start > 1: mid = (start + end) // 2 if S[mid] > x: end = mid else: start = mid print(end)