#include <bits/stdc++.h>
using namespace std;
long long a[5005], dp[5005][5005];
int main() {
  int n, m, k;
  while (~scanf("%d%d%d", &n, &m, &k)) {
    for (int i = 1; i <= n; i++) scanf("%I64d", &a[i]);
    a[0] = 0;
    for (int i = 2; i <= n; i++) a[i] += a[i - 1];
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= n; j++) dp[i][j] = 0;
    long long sum = 0;
    for (int i = 1; i <= k; i++) {
      long long mx = dp[i - 1][(i - 1) * m];
      int t = (i - 1) * m + 1;
      for (int j = i * m; j <= n - (k - i) * m; j++) {
        dp[i][j] = a[j] - a[j - m] + mx;
        if (t - 1 <= j - m) mx = max(mx, dp[i - 1][t++]);
        sum = max(sum, dp[i][j]);
      }
    }
    printf("%I64d\n", sum);
  }
}
