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