#include <stdio.h>
void sliding_window_sum(int arr[], int n, int k) {
// Your logic here
int i, j;
for (i = 0; i < n+1-k; i++) {
int sum=0;
for (j = 0; j < k; j++) {
sum += arr[i+j];
}
printf("%d ", sum);
}
}
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;
}