#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 5000 + 5;
const ll INF = 1e17 + 5;
int n, m, k;
int a[N];
ll prefixSum[N];
ll mem[N][N];
ll dp(int i, int cnt) {
  if (cnt == k) return 0;
  if (i == n + 1) return -INF;
  if (mem[i][cnt] != -1) return mem[i][cnt];
  ll ans = dp(i + 1, cnt);
  if (i + m - 1 <= n)
    ans =
        max(ans, prefixSum[i + m - 1] - prefixSum[i - 1] + dp(i + m, cnt + 1));
  return mem[i][cnt] = ans;
}
int main() {
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 1; i <= n; i++) {
    prefixSum[i] = prefixSum[i - 1] + 1ll * a[i];
  }
  memset(mem, -1, sizeof mem);
  printf("%lld\n", dp(1, 0));
}
