#include <bits/stdc++.h>
using namespace std;
int n, m, k;
long long a[5005], F[5001][5001];
void setIO(string a) {
  string in = a + ".in", out = a + ".out";
  freopen(in.c_str(), "r", stdin);
  freopen(out.c_str(), "w", stdout);
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = (1); i <= (n); i++) {
    scanf("%I64d", &a[i]);
    a[i] += a[i - 1];
  }
  long long an = -210000000;
  memset(F, -1, sizeof(F));
  F[0][0] = 0;
  for (int i = (0); i <= (n); i++) {
    for (int j = 0; j <= i && j <= k; j++) {
      F[i + 1][j] = max(F[i + 1][j], F[i][j]);
      if (i + m <= n && j + 1 <= k)
        F[i + m][j + 1] = max(F[i + m][j + 1], F[i][j] + a[i + m] - a[i]);
    }
    an = max(an, F[i][k]);
  }
  printf("%I64d\n", an);
  return 0;
}
