#include <bits/stdc++.h>
using namespace std;
const long long MAX = 203;
long long a[MAX];
long long f[MAX][MAX];
long long k, n, x;
signed main() {
  long long best = 0, i;
  cin >> n >> k >> x;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  if (x < n / k) {
    cout << -1;
    return 0;
  }
  for (long long u = 1; u <= x; u++) {
    i = u;
    while (i <= min(u * k, n)) {
      best = 0;
      for (long long j = max(i - k, 0LL); j < i; j++) {
        best = max(best, f[j][u - 1]);
      }
      f[i][u] = best + a[i];
      i++;
    }
  }
  best = 0;
  for (long long i = n; i >= n - k + 1; i--) {
    best = max(best, f[i][x]);
  }
  cout << best;
}
