#include <bits/stdc++.h>
using namespace std;
const int maxn = 210;
int n, m, x;
long long dp[maxn][maxn], v[maxn], ans = -1;
void read_and_parse() {
  scanf("%d%d%d", &n, &m, &x);
  for (int i = 1; i <= n; i++) scanf("%d", &v[i]);
}
void solve() {
  memset(dp, 0xcf, sizeof(dp));
  dp[0][0] = 0;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= x; j++)
      for (int k = max(0, i - m); k < i; k++)
        dp[i][j] = max(dp[i][j], dp[k][j - 1] + v[i]);
  for (int i = n - m + 1; i <= n; i++) ans = max(ans, dp[i][x]);
  printf("%lld\n", ans);
}
int main() {
  read_and_parse();
  solve();
  return 0;
}
