#include <bits/stdc++.h>
using namespace std;
vector<long long> a;
vector<vector<vector<long long>>> dp;
long long solve(long long i, long long j, long long x, long long l) {
  if (x == 0) {
    if (a.size() - i < l) return 0;
    return -1e12;
  }
  if (i == a.size()) {
    if (x == 0) return 0;
    return -1e12;
  }
  if (dp[i][j][x] != -1) return dp[i][j][x];
  if (i - j <= l)
    return dp[i][j][x] =
               max(a[i] + solve(i + 1, i, x - 1, l), solve(i + 1, j, x, l));
  else
    return dp[i][j][x] = solve(i + 1, j, x, l);
}
void tests() {
  long long n, k, x;
  cin >> n >> k >> x;
  a.resize(n + 1);
  dp.assign(n + 1,
            vector<vector<long long>>(n + 1, vector<long long>(x + 1, -1)));
  a[0] = 0;
  for (long long i = 0; i < n; i++) cin >> a[i + 1];
  long long ans = solve(1, 0, x, k);
  if (ans < 0) ans = -1;
  cout << ans << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    tests();
  }
  return 0;
}
