#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e9 + 10;
int n, m, k;
int p[50005];
long long sum[50005];
long long dp[5005][5005];
int main() {
  while (~scanf("%d %d %d", &n, &m, &k)) {
    for (int i = 1; i <= n; i++) {
      scanf("%d", &p[i]);
    }
    long long S = 0;
    for (int i = 1; i <= n; i++) {
      S += p[i];
      if (i >= m) {
        sum[i] = S;
        S -= p[i - m + 1];
      }
    }
    memset(dp, -1, sizeof(dp));
    for (int i = 0; i <= n; i++) dp[i][0] = 0;
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= k; j++) {
        dp[i][j] = dp[i - 1][j];
        if (i - m >= 0 && dp[i - m][j - 1] != -1)
          dp[i][j] = max(dp[i][j], dp[i - m][j - 1] + sum[i]);
      }
    }
    printf("%I64d\n", dp[n][k]);
  }
  return 0;
}
