#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
int solder_cnt, groop_size, swap_cnt;
vector<int> solders;
void read() {
  cin >> solder_cnt >> groop_size >> swap_cnt;
  solders.resize(solder_cnt);
  for (int i = 0; i < solder_cnt; ++i) cin >> solders[i];
}
void solve() {
  read();
  int max_pos_sum = (solder_cnt - 1) * solder_cnt / 2;
  vector<vector<vector<int> > > din(
      2,
      vector<vector<int> >(groop_size + 1, vector<int>(max_pos_sum + 1, inf)));
  din[0][0][0] = 0;
  for (int n = 1; n <= solder_cnt; ++n) {
    din[n & 1][0][0] = 0;
    for (int i = 0; i < n; ++i) {
      din[n & 1][1][i] = solders[i];
    }
    for (int k = 1; k <= groop_size; ++k) {
      for (int c = 1; c <= max_pos_sum; ++c) {
        din[n & 1][k][c] = din[(n & 1) ^ 1][k][c];
        int idx = c - (n - 1);
        if (idx >= 0)
          din[n & 1][k][c] = min(din[n & 1][k][c],
                                 din[(n & 1) ^ 1][k - 1][idx] + solders[n - 1]);
      }
    }
  }
  int ans = 1e9;
  int addition = groop_size * (groop_size - 1) / 2;
  swap_cnt += addition;
  for (int i = 0; i <= min(swap_cnt, (int)din[0][0].size() - 1); ++i) {
    ans = min(ans, din[solder_cnt & 1][groop_size][i]);
  }
  cout << ans << endl;
}
int main() {
  solve();
  return 0;
}
