#include <bits/stdc++.h>
using namespace std;
int n, k, x;
int a[255];
long long dp[255][255][255];
int main() {
  cin >> n >> k >> x;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= k; j++) {
      for (int p = 0; p <= x; p++) {
        dp[i][j][p] = -LLONG_MAX;
      }
    }
  dp[0][1][0] = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 1; j <= k; j++)
      for (int choose = 0; choose <= x; choose++) {
        if (dp[i][j][choose] == -LLONG_MAX) continue;
        if (j != k) {
          dp[i + 1][j + 1][choose] =
              max(dp[i + 1][j + 1][choose], dp[i][j][choose]);
        }
        dp[i + 1][1][choose + 1] =
            max(dp[i + 1][1][choose + 1], dp[i][j][choose] + a[i]);
      }
  }
  long long res = -LLONG_MAX;
  for (int i = 0; i <= k; i++) res = max(res, dp[n][i][x]);
  if (res == -LLONG_MAX) res = -1;
  cout << res;
}
