K-th smallest number

No attempts yetTime limit2sMemory limit512 MB

Problem

You are given NN numbers A1,A2,,ANA_1, A_2, \dots, A_N. Sort them in ascending order and print the number that ends up at position KK, counting from the front.

If a value appears several times, every occurrence counts as a separate element.

Input

The first line contains NN and KK. (1N5×1061 \le N \le 5 \times 10^6, 1KN1 \le K \le N)

The second line contains A1,A2,,ANA_1, A_2, \dots, A_N, separated by spaces. (109Ai109-10^9 \le A_i \le 10^9)

Output

Print, on one line, the KK-th number from the front after AA is sorted in ascending order.