#include <bits/stdc++.h>
template <typename WType>
using graph_w_list_t =
    std::vector<std::vector<std::pair<uint_fast64_t, WType>>>;
int main() {
  uint_fast64_t n, k, x;
  std::cin >> n >> k >> x;
  uint_fast64_t lines = x, cols = n;
  uint_fast64_t gsz = cols * lines + 1;
  graph_w_list_t<int_fast64_t> graph(
      gsz, std::vector<std::pair<uint_fast64_t, int_fast64_t>>());
  for (uint_fast64_t i = 0; i < n; ++i) {
    int_fast64_t ai;
    std::cin >> ai;
    for (uint_fast64_t j = 0; j < lines - 1; ++j) {
      for (uint_fast64_t l = 1; l <= k && i + l < cols; ++l) {
        graph[i + j * cols].push_back(
            std::make_pair(i + l + (j + 1) * cols, ai));
      }
    }
    if (i + k >= n)
      graph[i + n * (lines - 1)].push_back(std::make_pair(gsz - 1, ai));
  }
  for (uint_fast64_t l = 1; l < k && l < n; ++l) {
    graph[0].push_back(std::make_pair(l, 0));
  }
  std::vector<int_fast64_t> dist(gsz, -1);
  dist[0] = 0;
  for (uint_fast64_t i = 0; i < gsz; ++i) {
    if (dist[i] == -1) continue;
    for (uint_fast64_t j = 0; j < graph[i].size(); ++j)
      if (dist[graph[i][j].first] < dist[i] + graph[i][j].second)
        dist[graph[i][j].first] = dist[i] + graph[i][j].second;
  }
  std::cout << dist[gsz - 1] << std::endl;
  return 0;
}
