#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T& x) {
  static char b, f;
  b = getchar();
  f = 1, x = 0;
  for (; !isdigit(b); b = getchar())
    if (b == '-') f = -1;
  for (; isdigit(b); b = getchar()) x = (x << 1) + (x << 3) + b - '0';
  x *= f;
}
template <typename T, typename... Args>
inline void read(T& x, Args&... args) {
  read(x);
  read(args...);
}
long long qpow(long long q, long long n, long long mod) {
  long long ans = 1 % mod;
  while (n) {
    if (n & 1) ans = ans * q % mod;
    q = q * q % mod;
    n >>= 1;
  }
  return ans;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
const long double eps = 1e-6;
const long double pi = acos(-1);
const long long lnf = 0x3f3f3f3f3f3f3f3f;
const int inf = 0x3f3f3f3f;
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
const char ds[] = "DRUL";
const int mod = 998244353;
const int N = 3 + 200;
int n, a[N], k, x;
long long dp[N][N][N];
int main() {
  memset(dp, 0xcf, sizeof dp);
  cin >> n >> k >> x;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  dp[0][0][0] = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= x; ++j) {
      for (int q = 0; q <= k; ++q) {
        if (j >= 1 && q <= k - 1)
          dp[i][j][0] = max(dp[i][j][0], dp[i - 1][j - 1][q] + a[i]);
        if (q - 1 >= 0 && q <= k - 1)
          dp[i][j][q] = max(dp[i][j][q], dp[i - 1][j][q - 1]);
      }
    }
  }
  long long ans = -1;
  for (int i = 0; i <= k; ++i) ans = max(ans, dp[n][x][i]);
  cout << ans << '\n';
  return 0;
}
