#include <bits/stdc++.h>
using namespace std;
int inf = 0x3f3f3f3f;
int main() {
  long long dp[201][201];
  int a[201];
  int n, k, x;
  cin >> n >> k >> x;
  for (int i = 1; i <= n; i++) cin >> a[i];
  memset(dp, -1 * inf, sizeof(dp));
  dp[0][0] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = i - 1; j >= max(i - k, 0); j--) {
      for (int m = 1; m <= x; m++) {
        dp[i][m] = max(dp[j][m - 1] + a[i], dp[i][m]);
      }
    }
  }
  long long ans = -1;
  for (int i = n; i > n - k; i--)
    if (dp[i][x]) ans = max(ans, dp[i][x]);
  cout << ans << endl;
}
