#include <bits/stdc++.h>
using namespace std;
const int N = 101000;
string s;
long long n, m, k;
int ma[200001];
vector<long long> v;
long long dp[202][202][202];
long long solv(long long ind, long long cnts, long long tcnt) {
  if (dp[ind][cnts][tcnt] != -1) {
    return dp[ind][cnts][tcnt];
  }
  if (ind >= n) return 0;
  if (tcnt >= m) {
    if (n - ind >= k) {
      return -9000000000000000000;
    } else {
      return 0;
    }
  }
  if (cnts == k) {
    dp[ind][cnts][tcnt] = solv(ind + 1, 1, tcnt + 1) + v[ind];
    return dp[ind][cnts][tcnt];
  }
  dp[ind][cnts][tcnt] =
      max(solv(ind + 1, cnts + 1, tcnt), solv(ind + 1, 1, tcnt + 1) + v[ind]);
  return dp[ind][cnts][tcnt];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> k >> m;
  memset(dp, -1, sizeof dp);
  for (int i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v.push_back(x);
  }
  long long ans = solv(0, 1, 0);
  if (ans <= 0) {
    cout << -1 << endl;
  } else {
    cout << ans << endl;
  }
  return 0;
}
