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