#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << "\n";
  err(++it, args...);
}
long long int dp[203][203];
int main() {
  int n, k, x, i, j, a;
  scanf("%d%d%d", &n, &k, &x);
  vector<int> v(n);
  for (i = 0; i < n; i++) scanf("%d", &v[i]);
  for (i = 0; i < k - 1; i++) dp[i][0] = 0;
  for (i = k - 1; i < n; i++) dp[i][0] = -1;
  dp[0][1] = v[0];
  for (j = 2; j < n + 1; j++) dp[0][j] = -1;
  long long int temp;
  for (i = 1; i < n; i++) {
    if (i < k)
      dp[i][1] = v[i];
    else
      dp[i][1] = -1;
    for (j = 2; j < i + 2; j++) {
      temp = -1;
      for (a = 1; i - a >= 0; a++) {
        if (a > k) break;
        temp = max(temp, dp[i - a][j - 1]);
      }
      if (temp < 0)
        dp[i][j] = -1;
      else
        dp[i][j] = v[i] + temp;
    }
  }
  temp = -1;
  for (i = n - k; i < n; i++) temp = max(temp, dp[i][x]);
  cout << temp << "\n";
}
