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