#include <bits/stdc++.h>
using namespace std;
const int mxn = 405;
long long a[mxn], n, k, x, dp[mxn][mxn], l = -1;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  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 = 1; i <= n; i++) {
    for (int j = 1; j <= x; j++) {
      if (k * j + k - 1 < i) {
        dp[i][j] = -1;
      } else {
        for (int h = 1; h <= k; h++) {
          if (dp[i][j] == 0 and i + h > k) break;
          dp[i + h][j + 1] = max(dp[i + h][j + 1], dp[i][j] + a[i + h]);
        }
      }
    }
  }
  for (int i = 0; i < k; i++) {
    if (n - i <= 0) break;
    l = max(l, dp[n - i][x]);
  }
  if (l <= 0) {
    cout << -1;
  } else
    cout << l;
  return 0;
}
