#include int ri() { int n; scanf("%d", &n); return n; } int main() { int n = ri(); int k = ri(); int a[n]; for (auto &i : a) i = ri(); int64_t sum[n + 1]; sum[0] = 0; for (int i = 0; i < n; i++) sum[i + 1] = sum[i] + a[i]; std::vector all; for (int i = 0; i <= n - k; i++) all.push_back(sum[i + k] - sum[i]); std::sort(all.begin(), all.end()); int q = ri(); for (int i = 0; i < q; i++) { int x = ri(); printf("%d\n", (int) (std::upper_bound(all.begin(), all.end(), x) - all.begin())); } return 0; }