#include <bits/stdc++.h>
using namespace std;
ifstream f("1.in");
int n, k, x;
long long a[205], ans;
long long dp[205][205];
int main() {
  cin >> n >> k >> x;
  for (int i = 1; i <= n; i++) cin >> a[i];
  if (k * (x + 1) - 1 < n)
    cout << "-1";
  else {
    for (int i = 1; i <= n; i++) {
      for (int j = 0; j < min(x, i); j++) {
        if (k * (j + 1) - 1 < i - 1) continue;
        for (int l = max(0, i - k); l < i; l++)
          dp[i][j + 1] = max(dp[i][j + 1], dp[l][j] + a[i]);
      }
    }
    for (int j = 1; j <= n; j++)
      for (int l = n - k + 1; l <= n; l++) ans = max(ans, dp[l][j]);
    cout << ans;
  }
  return 0;
}
