#include <bits/stdc++.h>
using namespace std;
long long int sum[5001];
long long int seq[5002][5001];
int m, n;
long long int fun_seq(int st, int k) {
  if (seq[st][k] == -1) {
    long long int res1 = (long long)0, prev_sum = (long long)-1;
    for (int i = st + m - 1; i <= n - (k - 1) * m; i++) {
      if (prev_sum < sum[i] - sum[i - m]) {
        long long int temp = sum[i] - sum[i - m] + fun_seq(i + 1, k - 1);
        if (res1 < temp) res1 = temp;
        prev_sum = sum[i] - sum[i - m];
      }
    }
    seq[st][k] = res1;
  }
  return seq[st][k];
}
int main() {
  for (int i = 1; i <= 5001; i++)
    for (int j = 1; j <= 5000; j++) seq[i][j] = -1;
  for (int i = 1; i <= 5001; i++) seq[i][0] = 0;
  int k;
  scanf("%d%d%d", &n, &m, &k);
  int a[n + 1];
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sum[0] = 0;
  sum[1] = a[1];
  for (int i = 2; i <= n; i++) {
    sum[i] = sum[i - 1] + a[i];
  }
  long long int res1 = (long long)0, prev_sum = (long long)-1;
  for (int i = m; i <= n - (k - 1) * m; i++) {
    if (prev_sum < sum[i] - sum[i - m]) {
      long long int temp = sum[i] - sum[i - m] + fun_seq(i + 1, k - 1);
      if (res1 < temp) res1 = temp;
      prev_sum = sum[i] - sum[i - m];
    }
  }
  printf("%lld ", res1);
  return 0;
}
