#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int maxn = 205;
long long dp[maxn][maxn][2];
long long a[maxn];
int n, k, x;
int main() {
  scanf("%d%d%d", &n, &k, &x);
  for (int i = 1; i <= n; ++i) scanf("%lld", &a[i]);
  memset(dp, -1, sizeof(dp));
  for (int i = 1; i <= x; ++i) {
    for (int j = i; j <= n; ++j) {
      int idx = j - k;
      if (idx < 0) idx = 0;
      for (int p = j - 1; p >= idx; --p) {
        if (p == 0)
          dp[j][i][1] = max(dp[j][i][1], a[j]);
        else {
          if (dp[p][i - 1][1] == -1) continue;
          dp[j][i][1] = max(dp[j][i][1], dp[p][i - 1][1] + a[j]);
        }
      }
      idx = j - k + 1;
      if (idx <= 0) idx = 1;
      for (int p = j - 1; p >= idx; --p) {
        if (dp[p][i][1] == -1) continue;
        dp[j][i][0] = max(dp[j][i][0], dp[p][i][1]);
      }
    }
  }
  long long ans = max(dp[n][x][1], dp[n][x][0]);
  if (ans == -1)
    puts("-1");
  else
    printf("%lld\n", ans);
  return 0;
}
