N cards lie in a row. The i-th card from the left (1≤i≤N) has the integer ai written on it.
You play the following game with these cards. Choose a block of K or more consecutive cards, then do this:
- Lay the chosen cards out from the left in increasing order of the integers written on them.
- Write down on paper the integer on the K-th card from the left.
- Put every chosen card back where it was.
You do this once for every block of K or more consecutive cards. That is, for every pair (l,r) with 1≤l≤r≤N and K≤r−l+1, you write down the K-th smallest integer among al,al+1,…,ar.
Sort the integers you wrote down in increasing order. The L-th of them, counting from the left, is your score in this game. Find the score.