#include <bits/stdc++.h>
using namespace std;
const int N = 5555;
const long long inf = (long long)1e18;
int n, m, k;
long long a[N];
long long dp[N][N];
long long solve(int i, int t) {
  if (i == n) {
    return t == k ? 0 : -inf;
  }
  long long& res = dp[i][t];
  if (res != -1) {
    return res;
  }
  res = solve(i + 1, t);
  if (i + m <= n && t + 1 <= k) {
    res = max(res, solve(i + m, t + 1) + a[i + m] - a[i]);
  }
  return res;
}
int main() {
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", a + i);
    a[i] += a[i - 1];
  }
  memset(dp, -1, sizeof(dp));
  printf("%lld\n", solve(0, 0));
  return 0;
}
