#include <bits/stdc++.h>
using namespace std;
const int N = 160;
int n, m, x, y, a[N], dpl[80][6000], dpr[80][6000];
void Init() {
  memset(dpl, -1, sizeof(dpl));
  memset(dpr, -1, sizeof(dpr));
  memset(dpl[0], 0, sizeof(dpl[0]));
  memset(dpr[0], 0, sizeof(dpr[0]));
}
void GetData() {
  scanf("%d%d", &m, &y);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
}
void chkmin(int &a, int b) {
  if (a == -1 || a > b) a = b;
}
void chkmax(int &a, int b) {
  if (a == -1 || a < b) a = b;
}
void Solve() {
  int i, j, k, ans, sum = 0;
  x = min(m, n - m);
  y = min(y, 5999);
  for (i = 1; i <= m; ++i) sum += a[i];
  ans = sum;
  for (i = m; i >= 1; --i) {
    for (j = x; j >= 1; --j) {
      for (k = m - i; k <= y; ++k) {
        if (dpl[j - 1][k - m + i] != -1)
          chkmax(dpl[j][k], dpl[j - 1][k - m + i] + a[i]);
      }
      for (k = 1; k <= y; ++k) chkmax(dpl[j][k], dpl[j][k - 1]);
    }
  }
  for (i = m + 1; i <= n; ++i) {
    for (j = x; j >= 1; --j) {
      for (k = i - m - 1; k <= y; ++k) {
        if (dpr[j - 1][k - i + m + 1] != -1)
          chkmin(dpr[j][k], dpr[j - 1][k - i + m + 1] + a[i]);
      }
    }
    for (k = 1; k <= y; ++k) chkmin(dpr[j][k], dpr[j][k - 1]);
  }
  for (i = 1; i <= x; ++i) {
    for (j = 0; i + j <= y; ++j) {
      if (dpl[i][j] != -1 && dpr[i][y - i - j] != -1)
        ans = min(ans, sum - dpl[i][j] + dpr[i][y - i - j]);
    }
  }
  printf("%d\n", ans);
}
int main() {
  while (~scanf("%d", &n)) {
    Init();
    GetData();
    Solve();
  }
  return 0;
}
