#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
long long a[5005];
long long sum[5006], f[5005][5005];
int main() {
  scanf("%lld %lld %lld", &n, &m, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  long long qz = 0;
  for (int i = 1; i <= n; i++) {
    qz += a[i];
    if (i >= m) {
      sum[i] = qz;
      qz -= a[i - m + 1];
    }
  }
  memset(f, -1, sizeof(f));
  for (int i = 0; i <= n; i++) {
    f[i][0] = 0;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= k; j++) {
      f[i][j] = f[i - 1][j];
      if (i >= m && f[i - m][j - 1] > -1) {
        f[i][j] = max(f[i][j], f[i - m][j - 1] + sum[i]);
      }
    }
  }
  printf("%lld", f[n][k]);
  return 0;
}
