#include <bits/stdc++.h>
using namespace std;
long long int dp[5002][5002];
long long int solve(long long int arr[], int n, int m, int k) {
  if (dp[k][n] != -1) return dp[k][n];
  if (k == 0) return dp[k][n] = 0;
  if (n - m * k < 0)
    return dp[k][n] = -100000000000000;
  else {
    long long int s = 0;
    for (int i = n - 1; i > n - m - 1; i--) s += arr[i];
    return dp[k][n] =
               max(s + solve(arr, n - m, m, k - 1), solve(arr, n - 1, m, k));
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m, k;
  cin >> n >> m >> k;
  long long int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 0; i <= k; i++)
    for (int j = 0; j <= n; j++) dp[i][j] = -1;
  cout << solve(arr, n, m, k) << '\n';
  return 0;
}
