#include <bits/stdc++.h>
using namespace std;
long long accum[5001], memo[5001][5001];
int n, m;
long long solve(int ind, int k) {
  if (!k) return 0;
  long long &ret = memo[ind][k];
  if (ret != -1) return ret;
  if (ind + (k * m) > n + 1) return -1LL << 62;
  return ret = max(solve(ind + 1, k),
                   solve(ind + m, k - 1) + accum[ind + m - 1] - accum[ind - 1]);
}
int main() {
  int k, in;
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &in);
    accum[i] = accum[i - 1] + (long long)in;
  }
  memset(memo, -1, sizeof(memo));
  printf("%I64d\n", solve(1, k));
  return 0;
}
