import java.util.*; public class Main { static final int MOD = 1000000007; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); int[] arr = new int[n]; for (int i = 0; i < n; i++) { arr[i] = sc.nextInt(); } long sum = 0; for (int i = 0; i < k; i++) { sum += arr[i]; } TreeMap map = new TreeMap<>(); map.put(sum, 1); for (int i = k; i < n; i++) { sum += arr[i] - arr[i - k]; if (map.containsKey(sum)) { map.put(sum, map.get(sum)); } else { map.put(sum, 1); } } Long start = Long.MIN_VALUE; int total = 0; while ((start = map.higherKey(start)) != null) { total += map.get(start); map.put(start, total); } map.put(Long.MIN_VALUE, 0); int q = sc.nextInt(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < q; i++) { long x = sc.nextInt(); sb.append(map.floorEntry(x).getValue()).append("\n"); } System.out.print(sb); } }