#include <bits/stdc++.h>
using namespace std;
const int maxn = 205;
int n, k, m;
long long ans = -1e13;
long long a[maxn], f[maxn][maxn];
inline long long read() {
  long long ret = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -f;
    ch = getchar();
  }
  while (ch >= 48 && ch <= 57) {
    ret = ret * 10 + ch - 48;
    ch = getchar();
  }
  return ret * f;
}
int main() {
  memset(f, 128, sizeof f);
  f[0][0] = 0;
  n = read();
  k = read();
  m = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= min(m, i); j++) {
      for (int t = i - 1; t >= i - k && t >= 0; t--)
        f[i][j] = max(f[i][j], f[t][j - 1]);
      f[i][j] += a[i];
    }
  for (int i = n; i > n - k; i--) ans = max(ans, f[i][m]);
  printf("%lld", ans < 0 ? -1 : ans);
  return 0;
}
