#include <bits/stdc++.h>
using namespace std;
long long a[205], n, x, dp[205][205], maks, hasil(-1);
int k;
int main() {
  memset(dp, -1, sizeof(dp));
  cin >> n >> k >> x;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= k; i++) {
    dp[i][1] = a[i];
  }
  for (int i = 2; i <= x; i++) {
    for (int j = 1; j <= n; j++) {
      maks = max(1, j - k);
      for (int m = maks; m < j; m++) {
        if (dp[m][i - 1] == -1) {
          continue;
        }
        dp[j][i] = max(dp[m][i - 1] + a[j], dp[j][i]);
      }
    }
  }
  for (int i = n - k + 1; i <= n; i++) {
    hasil = max(hasil, dp[i][x]);
  }
  cout << hasil << endl;
}
