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