#include <bits/stdc++.h>
using namespace std;
int n, k, x;
long long a[205];
long long dp[205][205];
long long getdp(int l, int ch) {
  if (ch == 0) return -1000000007;
  if (!dp[l][ch]) {
    long long mx = -1000000007;
    for (int i = l - k; i <= (int)l - 1; ++i) {
      if (i >= 1) {
        mx = max(mx, getdp(i, ch - 1));
      }
    }
    if (mx == -1000000007)
      dp[l][ch] = -1000000007;
    else
      dp[l][ch] = mx + a[l];
  }
  return dp[l][ch];
}
int main() {
  cin >> n >> k >> x;
  for (int i = 1; i <= (int)n; ++i) cin >> a[i];
  for (int i = 1; i <= (int)k; ++i) dp[i][1] = a[i];
  long long ans = -1;
  for (int i = n - k + 1; i <= (int)n; ++i) {
    ans = max(ans, getdp(i, x));
  }
  cout << ans << endl;
}
