#include <bits/stdc++.h>
using namespace std;
const int maxp = 22;
const long double EPS = 1e-18;
const long long INF = 2e18;
const int MOD = 1e9 + 7;
const int N = 201;
long long dp[N][N][N], arr[N];
int n, k;
long long solve(int i, int seg, int can) {
  if (i == n) return 0;
  if (can == 0 && i + seg < n) return -INF;
  if (dp[i][seg][can] != -1) return dp[i][seg][can];
  long long best;
  if (seg == 0)
    best = solve(i + 1, k - 1, can - 1) + arr[i];
  else {
    best = solve(i + 1, seg - 1, can);
    if (can) best = max(best, solve(i + 1, k - 1, can - 1) + arr[i]);
  }
  return dp[i][seg][can] = best;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int x;
  cin >> n >> k >> x;
  int i, j, l;
  for (i = 0; i < n; i++) cin >> arr[i];
  for (i = 0; i < n; i++)
    for (j = 0; j < k; j++)
      for (l = 0; l <= x; l++) dp[i][j][l] = -1;
  cout << max(-1ll, solve(0, k - 1, x));
}
