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