import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); int[] sums = new int[n + 1]; int[] values = new int[n - k + 2]; for (int i = 1; i <= n; i++) { sums[i] = sums[i - 1] + sc.nextInt(); if (i - k >= 0) { values[i - k] = sums[i] - sums[i - k]; } } values[n - k + 1] = Integer.MAX_VALUE; Arrays.sort(values); int q = sc.nextInt(); Question[] questions = new Question[q]; for (int i = 0; i < q; i++) { questions[i] = new Question(i, sc.nextInt()); } Arrays.sort(questions); int[] ans = new int[q]; int idx = 0; for (Question x : questions) { while (values[idx] <= x.value) { idx++; } ans[x.idx] = idx; } StringBuilder sb = new StringBuilder(); for (int x : ans) { sb.append(x).append("\n"); } System.out.print(sb); } static class Question implements Comparable { int idx; int value; public Question(int idx, int value) { this.idx = idx; this.value = value; } public int compareTo(Question another) { return value - another.value; } } }