#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T bpow(T p, T e) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p);
    p = (p * p);
  }
  return (T)ret;
}
int toInt(string s) {
  int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
int toLlint(string s) {
  long long int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
long long int sm[5005], p[5005][5005];
int a[5005], n, m, k;
long long int dp(int i, int j) {
  if (j == 0) return 0;
  if (i == n + 1) {
    return -LLONG_MAX;
  }
  long long int &pr = p[i][j];
  if (pr != -1) return pr;
  pr = 0;
  pr = max(pr, dp(i + 1, j));
  if (i + m <= n + 1)
    pr = max(pr, dp(i + m, j - 1) + sm[i + m - 1] - sm[i - 1]);
  return pr;
}
int main() {
  int cs = 1, t, i, j;
  scanf("%d%d", &n, &m);
  scanf("%d", &k);
  sm[0] = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    sm[i + 1] = a[i] + sm[i];
  }
  if (m == 1) {
    sort(a, a + n, greater<int>());
    long long int s = 0;
    for (i = 0; i < k; i++) {
      s += a[i];
    }
    cout << s;
    return 0;
  }
  memset(p, -1, sizeof p);
  cout << dp(1, k);
  return 0;
}
