#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e15;
int main() {
  int n, k, x;
  cin >> n >> k >> x;
  if ((k - 1) + k * x < n) {
    cout << -1;
    return 0;
  }
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<vector<long long> > dp(n);
  dp[0].resize(x + 1, 0);
  for (int i = 1; i <= x; i++) {
    dp[0][i] = a[0];
  }
  for (int i = 1; i < n; i++) {
    if (i < k - 1) {
      dp[i].resize(x + 1, 0);
    } else {
      dp[i].resize(x + 1, -INF);
    }
    for (int j = 1; j <= x; j++) {
      if (k * j <= i) {
        continue;
      }
      for (int q = 1; q <= k && i - q >= -1; q++) {
        if (i - q == -1) {
          dp[i][j] = max(dp[i][j], a[i]);
        } else {
          if (dp[i - q][j - 1] != -INF) {
            dp[i][j] = max(dp[i][j], dp[i - q][j - 1] + a[i]);
          }
        }
      }
    }
  }
  long long ans = 0;
  for (int q = 1; q <= k; q++) {
    for (int i = 0; i <= x; i++) {
      ans = max(ans, dp[n - q][i]);
    }
  }
  cout << ans;
  return 0;
}
