#include <bits/stdc++.h>
using namespace std;
const long long maxn = 5005, maxk = 5005;
long long f[maxn][maxk], n, m, K, a[maxn], sum[maxn];
int main() {
  scanf("%lld%lld%lld", &n, &m, &K);
  for (long long i = 1; i <= n; i++)
    scanf("%lld", &a[i]), sum[i] = sum[i - 1] + a[i];
  long long ans = 0;
  for (long long i = m; i <= n; i++) {
    for (long long j = 1; j <= K; j++) {
      if (j * m > i) break;
      f[i][j] = f[i - 1][j];
      f[i][j] = max(f[i][j], f[i - m][j - 1] + sum[i] - sum[i - m]);
    }
  }
  printf("%lld", f[n][K]);
  return 0;
}
