#include <bits/stdc++.h>
using namespace std;
bool isGoogles = 0;
const long long maxn = 2e5 + 10;
const long long max_val = 2e5 + 10;
const long long mod = 1000000009;
const long long bits = 10;
long long caseNumber = 1;
long long n, m, k;
vector<long long> v;
long long dp[5001][5001];
long long work(long long ind, long long rem) {
  if (dp[ind][rem] != -1) return dp[ind][rem];
  if (rem == 0) {
    return 0LL;
  }
  if (ind >= n) {
    return 1e-18;
  }
  long long add = rem % m;
  if (add != 0) {
    add = m - add;
    return dp[ind][rem] = v[ind] + work(ind + 1, rem - 1);
  } else {
    return dp[ind][rem] =
               max(work(ind + 1, rem), v[ind] + work(ind + 1, rem - 1));
  }
}
void jabru() {
  memset(dp, -1, sizeof(dp));
  cin >> n >> m >> k;
  v.assign(n, 0);
  for (int ele = 0; ele < n; ele++) cin >> v[ele];
  ;
  cout << work(0, m * k) << "\n";
}
bool TestCase = 0;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long t;
  t = 1;
  if (TestCase) {
    cin >> t;
  }
  while (t--) {
    if (isGoogles) {
      cout << "Case #" << caseNumber << ": ";
    }
    caseNumber++;
    jabru();
  }
  return 0;
}
