#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e14;
const int maxn = 211;
long long d[maxn][maxn];
long long a[maxn];
int main() {
  int n, k, x;
  cin >> n >> k >> x;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= x; j++) {
      d[i][j] = -inf;
    }
  }
  d[0][0] = 0;
  for (int j = 1; j <= x; j++) {
    for (int i = 1; i <= n; i++) {
      for (int s = max(0, i - k); s < i; s++) {
        d[i][j] = max(d[i][j], d[s][j - 1] + a[i]);
      }
    }
  }
  long long ans = -inf;
  for (int i = n - k + 1; i <= n; i++) {
    ans = max(ans, d[i][x]);
  }
  if (ans < 0)
    cout << -1;
  else
    cout << ans;
  return 0;
}
