#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
int64_t n, k, x;
const int64_t N = 202;
int64_t a[N];
int64_t dp[N][N][N];
int64_t calc(int64_t i, int64_t k1, int64_t x1) {
  if (x1 > x || k1 >= k) {
    return -1e18 - 5;
  }
  if (i == n) {
    if (x1 < x) {
      return -1e18 - 5;
    } else {
      return 0;
    }
  }
  if (dp[i][k1][x1] != -1) {
    return dp[i][k1][x1];
  }
  return dp[i][k1][x1] =
             max({calc(i + 1, k1 + 1, x1), calc(i + 1, 0, x1 + 1) + a[i]});
  ;
}
void solve() {
  cin >> n >> k >> x;
  for (int64_t i = 0; i < n; i++) {
    cin >> a[i];
  }
  int64_t seg = n / k;
  if (x < seg && x < seg + (n % k == 0)) {
    cout << -1 << '\n';
    return;
  }
  memset(dp, -1, sizeof(dp));
  cout << calc(0, 0, 0) << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int64_t t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
