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