def main(): N, K = map(int, input().split()) a = list(map(int, input().split())) range_sum = [] for i in range(N-K+1): if not range_sum: range_sum.append(sum(a[:K])) else: range_sum.append(range_sum[-1] + a[i+K-1] - a[i-1]) for _ in range(int(input())): x = int(input()) print(len(list(filter(lambda num: num <= x, range_sum)))) if __name__ == "__main__": main()