#include <bits/stdc++.h>
using namespace std;
typedef pair<long long int,int> pli;
const int MAXN = 100005;
const long long int INF = 1000000000000000000ll;
int A[MAXN];
long long int dp[2][MAXN];
int main()
{
	int n,m,k;
	scanf("%d %d %d", &n, &m, &k);
	for (int i = 1; i <= n; ++i)
		scanf("%d", &A[i]);
	memset(dp[0], 0, sizeof dp);
	for (int i = 1; i <= k; ++i)
	{
		int curr = i%2;
		int prev = 1 - curr;
		deque <pli> dq;
		for (int j = 0; j <= n; ++j)
		{
			if(j < i)
				dp[curr][j] = -INF;
			else
				dp[curr][j] = dq[0].first + 1ll*i*A[j];
			while(!dq.empty() && dq.back() < pli(dp[prev][j],j))
				dq.pop_back();
			dq.push_back(pli(dp[prev][j],j));
			while(!dq.empty() && dq[0].second <= j-m)
				dq.pop_front();
		}
	}
	long long int ans = -INF;
	for (int i = 0; i <= n; ++i)
		ans = max(ans, dp[k%2][i]);
	printf("%lld\n", ans);
	return 0;
}