#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long inf = 4e18;
const long long N = 205;
long long dp[N][N][N], n, k, x;
long long arr[N];
long long help(long long idx, long long skipped, long long taken) {
  if (skipped >= k or taken > x) return -inf;
  if (idx == n) {
    if (taken == x)
      return 0;
    else
      return -inf;
  }
  long long &ans = dp[idx][skipped][taken];
  if (ans != -1) return ans;
  ans = max(help(idx + 1, skipped + 1, taken),
            arr[idx] + help(idx + 1, 0, taken + 1));
  return ans;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long tt = 1;
  while (tt--) {
    memset(dp, -1, sizeof dp);
    cin >> n >> k >> x;
    for (long long i = 0; i < n; ++i) cin >> arr[i];
    long long ans = help(0, 0, 0);
    if (ans > 0)
      cout << ans;
    else
      cout << -1;
  }
  return 0;
}
