#include <bits/stdc++.h>
using namespace std;
int n, m, k;
long long int sum[5005], arr[5005];
long long int dp[5005][5005];
bool visited[5005][5005];
long long int INF = -6e12;
long long int fun(int i, int k) {
  if (i > n - m && k > 0) return INF;
  if (k == 0) return 0;
  if (visited[i][k]) return dp[i][k];
  long long int include, exclude;
  include = fun(i + m, k - 1) + sum[i];
  exclude = fun(i + 1, k);
  dp[i][k] = max(include, exclude);
  visited[i][k] = true;
  return dp[i][k];
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < n; ++i) {
    scanf("%lld", &arr[i]);
  }
  for (int i = 0; i < m; i++) sum[0] += arr[i];
  for (int i = 1; i <= n - m; i++) {
    sum[i] = sum[i - 1] + arr[i + m - 1] - arr[i - 1];
  }
  memset(visited, false, sizeof(visited));
  printf("%lld", fun(0, k));
}
