#include <bits/stdc++.h>
using namespace std;
long long DP[205][205], ar[205];
long long N, K, X;
int main() {
  cin >> N >> K >> X;
  for (int i = 0; i < N; i++) cin >> ar[i];
  for (int i = 0; i < N; i++)
    for (int j = 0; j <= X; j++) DP[i][j] = -2000000000009;
  if (K > 1) DP[0][0] = 0ll;
  DP[0][1] = ar[0];
  long long ans = -2000000000009;
  for (int j = 1; j <= X; j++) {
    for (int i = 0; i < N; i++) {
      long long pos = -2000000000009;
      if (i == K && j == 1) {
        DP[i][j] = -2000000000009;
        continue;
      }
      for (int k = max(0ll, (long long)(i - K)); k <= (long long)(i - 1); k++) {
        pos = max(pos, (long long)(DP[k][j - 1]));
      }
      DP[i][j] = max(DP[i][j], pos + ar[i]);
      DP[i][j] = (DP[i][j] < 0ll ? -2000000000009 : DP[i][j]);
    }
  }
  for (int i = N - K; i < N; i++) ans = max(ans, DP[i][X]);
  cout << (ans < 0ll ? -1 : ans) << endl;
  return (0);
}
