#include <bits/stdc++.h>
#define be(v) (v).begin(),(v).end()
#define pb(q) push_back(q)
typedef long long ll;
using namespace std;
const ll mod=1000000007, INF=mod*mod*3LL;
#define doublecout(a) cout<<fixed<<setprecision(10)<<a<<endl;

int main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    ll n, m, k;
    cin >> n >> m >> k;
    ll a[n];
    for(int i=0;i<n;i++){
    	cin >> a[i];
    }
    deque<pair<ll,ll> > dq[k+1];
    for(ll i=0;i<n;i++){
    	for(ll j=k-1;j>=1;j--){
    		while(dq[j-1].size() && dq[j-1].front().second < i - m)dq[j-1].pop_front();
    		if(dq[j-1].empty()) continue;
    		ll v = a[i]*(j+1) + dq[j-1].front().first;
    		while(dq[j].size() && dq[j].back().first < v) dq[j].pop_back();
    		dq[j].push_back({v, i});
    	}
    	while(dq[0].size() && a[i] > dq[0].back().first) dq[0].pop_back();
    	dq[0].push_back({a[i],i});
    }
    cout << dq[k-1].front().first << endl;
    return 0;
}
