#include <bits/stdc++.h>
using namespace std;
long long int dp[5001][5001];
long long int sum[5001];
int main() {
  std::ios::sync_with_stdio(false);
  long long int n, m, k;
  cin >> n >> m >> k;
  long long int ar[n];
  for (long long int i = 0; i < n; i++) {
    cin >> ar[i];
  }
  for (int i = 0; i < m; i++) {
    sum[i + 1] = sum[i] + ar[i];
  }
  for (int i = m; i < n; i++) {
    sum[i + 1] = sum[i] + ar[i] - ar[i - m];
  }
  long long int maxi = 0;
  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] + sum[i]);
      maxi = max(maxi, dp[i][j]);
    }
  }
  cout << maxi;
  return 0;
}
