#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
int main()
{
    ll n,k,x;
    cin>>n>>k>>x;

    vector<ll>a;
    for(int i=0;i<n;i++){
        ll x;cin>>x;
        a.push_back(x);
    }

    deque<ll>dq;
    ll c=1;ll zbir=0;
    for(int i=0;i<n-k+1;i++){
        zbir=0;c=1;
        //zbir=a[i]*c;
        //if(a[i]<0)c++;
        for(int j=i;j<k+i;j++){
            //cout<<c<<endl;
            zbir+=a[j]*c;
            if(a[j]<0)c++;
        }
        cout<<zbir<<endl;
    }
    return 0;
}