#include <stdio.h>
void sliding_window_sum(int arr[], int n, int k) {
unsigned int ix = 0;
while (ix + k <= n) {
int val = 0;
for (int i = ix; i < ix + k; i++) {
val += arr[i];
}
printf("%d ", val);
ix++;
}
}
int main() {
int n, k, arr[100];
scanf("%d %d", &n, &k);
for (int i = 0; i < n; i++) scanf("%d", &arr[i]);
sliding_window_sum(arr, n, k);
return 0;
}