#!/usr/bin/env python3 import bisect import sys input=sys.stdin.readline n,k=map(int,input().split()) arr=list(map(int,input().split())) vals=[] tmp=sum(arr[:k]) vals.append(tmp) for i in range(k,n): tmp+=arr[i] tmp-=arr[i-k] vals.append(tmp) vals=sorted(vals) q=int(input()) for _ in range(q): x=int(input()) print(bisect.bisect_right(vals,x))