#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int S = 75 * 75 + 1;
const int N = 151;
vector<vector<int>> cal(vector<int> Q) {
  int A[N][S];
  int B[N][S];
  vector<int> sum(Q.begin(), Q.end());
  int k = Q.size();
  auto& RA = A;
  auto& RB = B;
  for (int i = (1); i <= (k - 1); i++) sum[i] += sum[i - 1];
  for (int i = 0; i < (k); i++) {
    for (int len = 0; len < (i + 2); len++)
      for (int s = 0; s < (S); s++) {
        if (len == 0)
          RA[len][s] = 0;
        else if (len == i + 1)
          RA[len][s] = sum[i];
        else if (s == 0)
          RA[len][s] = sum[i] - sum[i - len];
        else {
          RA[len][s] = RB[len - 1][s] + Q[i];
          if (s >= len)
            RA[len][s] =
                (RA[len][s] < RB[len][s - len]) ? RB[len][s - len] : RA[len][s];
        }
      }
    swap(RA, RB);
  }
  vector<vector<int>> V(k + 1);
  for (int len = 0; len < (V.size()); len++)
    for (int s = 0; s < (S); s++) V[len].push_back(RB[len][s]);
  return V;
}
int main() {
  vector<int> Q1, Q2;
  int k, n, s;
  scanf("%d %d %d", &n, &k, &s);
  for (int i = 0; i < (n); i++) {
    int x;
    scanf("%d", &x);
    if (i < k)
      Q1.push_back(x);
    else
      Q2.push_back(-x);
  }
  reverse(Q2.begin(), Q2.end());
  auto V1 = cal(Q1);
  auto V2 = cal(Q2);
  for (int i = 0; i < (V2.size()); i++)
    for (int j = 0; j < (V2[i].size()); j++) V2[i][j] = -V2[i][j];
  if (s > S) s = S;
  int LEN = (k < n - k) ? k : n - k;
  int sum = 0;
  for (int i = 0; i < (Q1.size()); i++) sum += Q1[i];
  int ans = sum;
  if (k < n) {
    for (int s1 = 0; s1 < (s + 1); s1++)
      for (int len = 0; len < (LEN + 1); len++)
        if (len * len + s1 <= s)
          ans = (ans < sum + V2[len][s - s1 - len * len] - V1[len][s1])
                    ? ans
                    : sum + V2[len][s - s1 - len * len] - V1[len][s1];
  }
  cout << ans << endl;
  return 0;
}
