#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18 + 10;
const int inf = 1e9 + 10;
const int N = 1e6 + 10;
const int mod = 1e9;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  int n, k, x;
  cin >> n >> k >> x;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<vector<long long> > dp(n, vector<long long>(x, -INF));
  for (int i = 0; i < k; i++) dp[i][0] = a[i];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < x - 1; j++)
      for (int q = i + 1; q < min(n, i + k + 1); q++)
        dp[q][j + 1] = max(dp[q][j + 1], dp[i][j] + a[q]);
  long long ans = -INF;
  for (int i = n - k; i < n; i++) ans = max(ans, dp[i][x - 1]);
  if (ans < 0) ans = -1;
  cout << ans << "\n";
  return 0;
}
