#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, x;
  cin >> n >> k >> x;
  long long int a[n + 1], dp[x + 1][n + 1];
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  for (int i = 1; i <= k; ++i) {
    dp[1][i] = a[i];
  }
  for (int i = k + 1; i <= n; ++i) {
    dp[1][i] = 0;
  }
  for (int i = 2; i <= x; ++i) {
    for (int j = 1; j <= n; ++j) {
      dp[i][j] = 0;
    }
  }
  for (int i = 2; i <= x; ++i) {
    for (int j = 1; j <= n; ++j) {
      for (int q = 1; j - q >= 1 && q <= k; ++q) {
        if (dp[i - 1][j - q] != 0) {
          dp[i][j] = max(dp[i][j], dp[i - 1][j - q] + a[j]);
        }
      }
    }
  }
  long long int max = 0;
  for (int i = n - k + 1; i <= n; ++i) {
    if (dp[x][i] > max) {
      max = dp[x][i];
    }
  }
  cout << ((max == 0) ? -1 : max) << endl;
  return 0;
}
