#include <bits/stdc++.h>
using namespace std;
template <typename T>
void vout(T x) {
  cout << x << endl;
  exit(0);
}
int gcd(int a, int b) {
  while (a && b) {
    if (a > b)
      a %= b;
    else
      b %= a;
  }
  return a + b;
}
const long long inf = -1e18;
const long long mod = 1e9;
long long dp[300][300], a[400];
int n, k, x;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k >> x;
  if (n / k > x) vout(-1);
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 0; i < 300; ++i) {
    for (int j = 0; j < 300; ++j) dp[i][j] = inf;
  }
  dp[0][x] = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < x; ++j) {
      for (int t = max(0, i - k); t <= i; ++t) {
        if (dp[t][j + 1] >= 0) dp[i][j] = max(dp[i][j], dp[t][j + 1] + a[i]);
      }
    }
  }
  long long ans = 0;
  for (int i = n - k + 1; i <= n; ++i) ans = max(ans, dp[i][0]);
  vout(ans);
  return 0;
}
