#include<bits/stdc++.h>
using namespace std;
int main(){
int n,k;
vector<int>a;
// write your code here......
cin >> n >> k;
int num;
while(cin >> num){
a.push_back(num);
}
sort(a.begin(),a.end());
auto it = a.begin()+k-1;
cout << *it << endl;
return 0;
}

京公网安备 11010502036488号