#include <bits/stdc++.h>
using namespace std;
const int N = 200 + 10;
long long a[N], dp[N][N], ans = -1e18;
int main() {
  int n, k, x;
  scanf("%d%d%d", &n, &k, &x);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= n; j++) dp[i][j] = -1e18;
  dp[0][0] = 0;
  for (int j = 1; j <= x; j++) {
    for (int i = 1; i <= n; i++) {
      for (int s = max(0, i - k); s < i; s++) {
        dp[i][j] = max(dp[i][j], dp[s][j - 1] + a[i]);
      }
    }
  }
  for (int i = n - k + 1; i <= n; i++) ans = max(ans, dp[i][x]);
  if (ans < 0) ans = -1;
  printf("%lld\n", ans);
  return 0;
}
