#include <iostream>
#include <algorithm>
using namespace std;
const int NNUM=1000;
bool hashTable[NNUM+1];
int main() {
int nums[NNUM];
int n,x,nx,k;
while (scanf("%d",&n)!=EOF)
{
nx=0;
while(0<n--)
{
scanf("%d",&x);
if(hashTable[x]==false)
{
hashTable[x]=true;
nums[nx++]=x;
}
}
scanf("%d",&k);
sort(nums,nums+nx);
printf("%d\n",nums[k-1]);
}
}
// 64 位输出请用 printf("%lld")

京公网安备 11010502036488号