#include <bits/stdc++.h>
using namespace std;
int N, K, X;
long long v[222];
long long pd[202][202][202];
long long solve(int i, int k, int x) {
  if (x < 0) return -(1ll << 52);
  if (i == N) {
    if (!x) return 0;
    return -(1ll << 52);
  }
  if (pd[i][k][x] != -1) return pd[i][k][x];
  long long ret = -(1ll << 52);
  if (k == 1)
    ret = solve(i + 1, K, x - 1) + v[i];
  else {
    ret = solve(i + 1, K, x - 1) + v[i];
    ret = max(ret, solve(i + 1, k - 1, x));
  }
  return pd[i][k][x] = ret;
}
int main() {
  cin >> N >> K >> X;
  for (int i = (0); i < (N); i++) cin >> v[i];
  long long bla = N / K;
  if (bla > X || N < X) {
    cout << "-1\n";
    return 0;
  }
  for (int i = (0); i < (N + 1); i++)
    for (int j = (0); j < (K + 1); j++)
      for (int k = (0); k < (X + 1); k++) pd[i][j][k] = -1;
  long long ans = solve(0, K, X);
  cout << ans << endl;
  return 0;
}
