#include <bits/stdc++.h>
using namespace std;
const int lim = 5005;
int n, m, k;
int p[lim];
long long ps[lim];
long long dp[lim][lim];
void fill_ps() {
  ps[0] = (long long)p[0];
  for (int i = 1; i < n; i++) ps[i] = (long long)p[i] + ps[i - 1];
}
void fill_dp() {
  for (int j = 1; j <= k; j++)
    dp[n - (m * j)][j] = ps[n - 1] - ps[n - (m * j) - 1];
  for (int i = n - m - 1; i >= 0; i--)
    for (int j = 1; j <= k; j++)
      dp[i][j] =
          max(dp[i + m][j - 1] + ps[i + m - 1] - ps[i - 1], dp[i + 1][j]);
}
int main() {
  scanf("%d", &n);
  scanf("%d", &m);
  scanf("%d", &k);
  for (int i = 0; i < n; i++) scanf("%d", &p[i]);
  fill_ps();
  fill_dp();
  cout << dp[0][k];
  return 0;
}
