#include<bits/stdc++.h> using namespace std; int main(){ int n,k,x; vectora; cin>>n>>k; while(n--) { cin>>x; a.push_back(x); } sort(a.begin(), a.end()); cout<<a.at(k-1); // write your code here...... return 0; }