#include <bits/stdc++.h>
using namespace std;
vector<long long> sum(5005);
vector<vector<long long> > memo(5005, vector<long long>(5005));
vector<vector<bool> > calculated(5005, vector<bool>(5005));
int m, n;
long long knapsack(long long i, long long k) {
  if (i > n - m && k > 0) return -1000000001;
  if (k == 0) return 0;
  if (calculated[i][k]) return memo[i][k];
  calculated[i][k] = true;
  memo[i][k] = max(sum[i] + knapsack(i + m, k - 1), knapsack(i + 1, k));
  return memo[i][k];
}
int main() {
  long long k, temp = 0;
  cin >> n >> m >> k;
  vector<long long> array(n);
  for (long long i = 0; i < (m); i++) {
    cin >> array[i];
    temp += array[i];
  }
  sum[0] = temp;
  for (long long i = (m); i < (n); i++) {
    cin >> array[i];
    temp = temp + array[i] - array[i - m];
    sum[i - m + 1] = temp;
  }
  cout << knapsack(0, k) << endl;
}
