#include <bits/stdc++.h>
using namespace std;

template <typename T> class SlideMin {
public:
  vector<int> deq;
  vector<T> res;
  int n, k;
  SlideMin(vector<T> Array, int sz) {
    n = (int) Array.size(), k = sz;
    deq.resize(n), res.resize(n);
    int s = 0, t = 0;
    for (int i = 0; i < n; i++) {
      while (s < t && Array.at(deq.at(t - 1)) <= Array.at(i)) {
        t--;
      }
      deq.at(t++) = i;
      res.at(i) = Array.at(deq.at(s));
      if (deq.at(s) == i - k + 1) {
        s++;
      }
    }
  }
};

int main() {
  int N, M, K;
  cin >> N >> M >> K;
  vector<long> A(N);
  for (int i = 0; i < N; i++) cin >> A.at(i);
  SlideMin<long> SM(A, M);
  for (int i = 0; i + 1 < K; i++) {
    vector<long> tmp(N, -1e18);
    for (int j = 1; j < N; j++) {
      tmp.at(j) = max(tmp.at(j), SM.res.at(j - 1) + (i + 2) * A.at(j));
    }
    SM = SlideMin<long>(tmp, M);
  }
  cout << *max_element(SM.res.begin(), SM.res.end()) << "\n";
}