Secret Mission

No attempts yetTime limit2sMemory limit512 MB

Problem

Headquarters is picking agents for a secret mission. The nn candidates who fit the mission are already chosen. Every candidate is excellent in every respect, but there is one problem. They talk too much.

To deal with that, the supervisor lines up all nn candidates and assigns each one a talkativeness aia_i. The supervisor then performs at most ss operations. Each operation picks two adjacent candidates and swaps their places. Once every operation is done, the first kk candidates in the line are taken as agents.

The supervisor wants the sum of the talkativeness values of those kk agents to be as small as possible. Find the smallest sum the supervisor can reach.

Input

The first line contains three natural numbers nn, kk, ss separated by spaces. (1kn1501 \le k \le n \le 150, 1s1091 \le s \le 10^9)

The second line contains nn integers a1,a2,,ana_1, a_2, \ldots, a_n separated by spaces, the talkativeness of each candidate. (1ai1061 \le a_i \le 10^6)

Output

Print the smallest possible sum of the talkativeness values of the first kk candidates.

Hint

In the first example, swap the 2nd candidate with the 3rd candidate once.

In the second example, swap the 3rd with the 4th, then swap the 4th with the 5th. That is 2 operations.

In the third example, swap the 1st with the 2nd, then the 3rd with the 4th, then the 2nd with the 3rd. That is 3 operations.