#include <bits/stdc++.h>
using namespace std;
const int inf = 987654321;
const int MN = 105 * 75;
int N, K, S;
vector<int> Q;
vector<vector<int> > dp, dp2;
void get_dp() {
  dp = dp2 = vector<vector<int> >(MN, vector<int>(K + 1, 0));
  for (int s = 0; s < MN; s++) {
    for (int ch = 0; ch <= K; ch++) {
      dp[s][ch] = ch == 0 ? 0 : -inf;
    }
  }
  for (int i = K; i--;) {
    for (int s = 0; s < MN; s++) {
      for (int ch = 0; ch <= K; ch++) {
        dp2[s][ch] = dp[s][ch];
        if (ch != 0 && s >= K - i) {
          dp2[s][ch] = max(dp2[s][ch], Q[i] + dp[s - K + i][ch - 1]);
        }
      }
    }
    for (int s = 0; s < MN; s++) {
      for (int ch = 0; ch <= K; ch++) {
        dp[s][ch] = dp2[s][ch];
      }
    }
  }
}
vector<vector<int> > dp3, dp4;
void get_dp3() {
  dp3 = dp4 = vector<vector<int> >(MN, vector<int>(N - K + 1, 0));
  for (int s = 0; s < MN; s++) {
    for (int ch = 0; ch <= N - K; ch++) {
      dp3[s][ch] = ch == 0 ? 0 : inf;
    }
  }
  for (int i = K; i < N; i++) {
    for (int s = 0; s < MN; s++) {
      for (int ch = 0; ch <= N - K; ch++) {
        dp4[s][ch] = dp3[s][ch];
        if (ch != 0 && s >= i - K + 1) {
          dp4[s][ch] = min(dp4[s][ch], Q[i] + dp3[s - i + K - 1][ch - 1]);
        }
      }
    }
    for (int s = 0; s < MN; s++) {
      for (int ch = 0; ch <= N - K; ch++) {
        dp3[s][ch] = dp4[s][ch];
      }
    }
  }
}
int main() {
  scanf("%d %d %d", &N, &K, &S);
  Q.resize(N);
  int sum = 0;
  for (int i = 0; i < N; i++) {
    scanf("%d", &Q[i]);
    if (i < K) sum += Q[i];
  }
  get_dp();
  get_dp3();
  if (S >= MN) {
    int ans = inf;
    for (int i = 0; i <= min(K, N - K); i++) {
      ans = min(ans, sum - dp[MN - 1][i] + dp3[MN - 1][i]);
    }
    printf("%d", ans);
  } else {
    int ans = inf;
    for (int i = 0; i <= min(K, N - K); i++) {
      for (int j = 0; j <= S - i; j++) {
        ans = min(ans, sum - dp[j + i][i] + dp3[S - j][i]);
      }
    }
    printf("%d", ans);
  }
}
