#include <bits/stdc++.h>
using namespace std;
void snum(long long &x) { scanf("%lld", &x); }
void snum(long long &x, long long &y) { scanf("%lld %lld", &x, &y); }
void snum(long long &x, long long &y, long long &z) {
  scanf("%lld %lld %lld", &x, &y, &z);
}
long long a[210];
long long dp[210][210][210];
long long n, k, x;
long long f(long long pos, long long last, long long cnt) {
  if (cnt > x) return -1000000000000;
  if (pos == n) {
    if (cnt == x)
      return 0;
    else
      return -1000000000000;
  }
  long long &ret = dp[pos][last][cnt];
  if (ret > 0 || ret < -100) return ret;
  if (pos - last + 1 == k) {
    return ret = a[pos] + f(pos + 1, pos + 1, cnt + 1);
  }
  return ret =
             max(a[pos] + f(pos + 1, pos + 1, cnt + 1), f(pos + 1, last, cnt));
}
void doit() {
  snum(n);
  snum(k);
  snum(x);
  for (long long i = 0; i < n; i++) {
    snum(a[i]);
  }
  long long mini = n / k;
  if (x < mini) {
    printf("-1\n");
    return;
  }
  long long resp = f(0, 0, 0);
  if (resp < -(long long)1e12) {
    printf("-1\n");
    return;
  }
  printf("%lld\n", resp);
}
int main() {
  long long T = 1;
  while (T--) {
    doit();
  }
  return 0;
}
