eolymp
bolt
Try our new interface for solving problems
Problems

Find an element

Find an element

Time limit 3 seconds
Memory limit 128 MiB

Array of n integers is given. Find its k-th element in decreasing order.

Input data

First line contains the number of elements n (1n10^5) in array, and integer k(1k10^5). Second line contains n integers, not greater than 10^9 by absolute value.

Output data

Print the k-th element of array sorted in decreasing order, or -1 if such element does not exist.

Examples

Input example #1
10 3
1 8 2 1 4 7 3 2 3 6
Output example #1
6
Source 2-й этап Всеукраинской олимпиады по информатике 2013-2014 уч.г. 10 кл. г. Бердичев