12561256 SUSTech Online Judge
Problem 1256 --Lucky number

1256: Lucky number

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 715  Solved: 239
[Submit][Status][Web Board]

Description

Given \(n\) numbers \(a_1,a_2,...,a_n\), and an integer \(k\), Lanran thinks that the \(k^{th}\) smallest number is a lucky number. Please tell him what is the value of the lucky number.

Input

The first line of the input contains two integers \(n, k(1\le n\le 1\ 000\ 000, 1\le k\le n)\).

The second line contains \(n\) integers \(a_{1},a_{2},...,a_{n}(0\le a_{i}\le 1\ 000\ 000)\).

Output

Output one integer indicates the answer.

Sample Input

5 3
1 4 2 6 8

Sample Output

4

HINT

Source

 

[Submit][Status]