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