#include <bits/stdc++.h>
using namespace std;
const int N = 155, M = 10010;
int i, j, k, n, m, s, ans;
int f[N][M], a[N];
void Up(int &x, const int &y) {
  if (y < x) x = y;
}
int min(const int &x, const int &y) {
  if (x < y) return x;
  return y;
}
int main() {
  scanf("%d%d%d", &n, &m, &s);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  if ((n - m) * m <= s) {
    sort(a + 1, a + n + 1);
    for (i = 1; i <= m; i++) ans += a[i];
    printf("%d\n", ans);
    return 0;
  }
  memset(f, 60, sizeof f);
  for (k = 0; k <= s; k++) f[0][k] = 0;
  for (i = 1; i <= n; i++)
    for (j = min(i - 1, m); j >= 0; j--)
      for (k = 0; k <= s; k++) Up(f[j + 1][k + i - (j + 1)], f[j][k] + a[i]);
  printf("%d\n", f[m][s]);
}
