#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
void setIO(string name, int submit) {
  if (submit) {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    freopen((name + ".in").c_str(), "r", stdin);
    freopen((name + ".out").c_str(), "w", stdout);
  } else {
  }
}
long long dp[205][205];
int main() {
  setIO("", 0);
  int N, K, X;
  cin >> N >> K >> X;
  vector<int> arr;
  arr.push_back(0);
  for (int i = 0; i < N; i++) {
    int num;
    cin >> num;
    arr.push_back(num);
  }
  for (int l = 1; l <= N; l++) {
    for (int j = 0; j <= X; j++) {
      dp[l][j] = -1;
    }
  }
  for (int i = 1; i <= N; i++) {
    for (int j = X; j >= 0; j--) {
      if (j > 0) {
        for (int k = 1; k <= K; k++) {
          if (i - k >= 0 && dp[i - k][j - 1] != -1)
            dp[i][j] = max(dp[i][j], dp[i - k][j - 1] + arr[i]);
        }
      }
    }
  }
  long long ans = -1;
  for (int k = K - 1; k >= 0; k--) {
    if (N - k >= 0) ans = max(dp[N - k][X], ans);
  }
  cout << ans << "\n";
  return 0;
}
