#include <bits/stdc++.h>
using namespace std;
int p[5001];
long long int s[5001], dp[5001][5001];
int main() {
  int n, m, k, i, j;
  cin >> n >> m >> k;
  for (i = 1; i <= n; i++) cin >> p[i];
  s[0] = 0;
  for (i = 1; i <= n; i++) s[i] = s[i - 1] + p[i];
  for (i = 1; i <= k; i++) {
    for (j = m; j <= n; j++) {
      dp[i][j] = max(dp[i][j - 1], dp[i - 1][j - m] + (s[j] - s[j - m]));
    }
  }
  cout << dp[k][n];
  return 0;
}
