The R1 company wants to hold a web search championship. There were n computers given for the competition, each of them is connected to the Internet. The organizers believe that the data transfer speed directly affects the result. The higher the speed of the Internet is, the faster the participant will find the necessary information. Therefore, before the competition started, each computer had its maximum possible data transfer speed measured. On the i-th computer it was ai kilobits per second.

There will be k participants competing in the championship, each should get a separate computer. The organizing company does not want any of the participants to have an advantage over the others, so they want to provide the same data transfer speed to each participant's computer. Also, the organizers want to create the most comfortable conditions for the participants, so the data transfer speed on the participants' computers should be as large as possible.

The network settings of the R1 company has a special option that lets you to cut the initial maximum data transfer speed of any computer to any lower speed. How should the R1 company configure the network using the described option so that at least k of n computers had the same data transfer speed and the data transfer speed on these computers was as large as possible?

Input

The first line contains two space-separated integers n and k (1 ≤ k ≤ n ≤ 100) — the number of computers and the number of participants, respectively. In the second line you have a space-separated sequence consisting of n integers: a1, a2, ..., an (16 ≤ ai ≤ 32768); number ai denotes the maximum data transfer speed on the i-th computer.

Output

Print a single integer — the maximum Internet speed value. It is guaranteed that the answer to the problem is always an integer.

Examples

Input

3 2
40 20 30


Output

30


Input

6 4
100 20 40 20 50 50


Output

40

Note

In the first test case the organizers can cut the first computer's speed to 30 kilobits. Then two computers (the first and the third one) will have the same speed of 30 kilobits. They should be used as the participants' computers. This answer is optimal.
import java.io.*;
import java.util.*;

public class hack{

  public static class FastReader{
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String [] nextArray(){
            StringTokenizer tokens = new StringTokenizer(nextLine(), " ");
            String[] splited = new String[tokens.countTokens()];
            int index = 0;
            while(tokens.hasMoreTokens()){
              splited[index] = tokens.nextToken();
              if(splited[index]!="")
                ++index;
            }
            return splited;
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
  }
/*  public static BigInteger factorial(int num){
    if (num<=1)
        return BigInteger.ONE;
    else
        return factorial(num-1).multiply(BigInteger.valueOf(num));
    }*/
    /*static class Graph {
    // A user define class to represent a graph.
    // A graph is an array of adjacency lists.
    // Size of array will be V (number of vertices
    // in graph)
    int V;
    LinkedList<Integer>[] adjListArray;

    // constructor
    Graph(int V) {
        this.V = V+1;
        // define the size of array as
        // number of vertices
        adjListArray = new LinkedList[this.V];

        // Create a new list for each vertex
        // such that adjacent nodes can be stored

        for(int i = 1; i <= V ; i++){
            adjListArray[i] = new LinkedList<Integer>();
        }
    }

    // Adds an edge to an undirected graph
    void addEdge( int src, int dest) {
        // Add an edge from src to dest.
        adjListArray[src].add(dest);

        // Since graph is undirected, add an edge from dest
        // to src also
        adjListArray[dest].add(src);
    }

    int DFSUtil(int v,boolean visited[])
    {
        // Mark the current node as visited and print it
        int c=0;
        visited[v] = true;
        c=1;
        //System.out.print(v+" ");

        // Recur for all the vertices adjacent to this vertex
        Iterator<Integer> i = adjListArray[v].listIterator();
        while (i.hasNext())
        {
            int n = i.next();
            if (!visited[n])
                c=c+DFSUtil(n, visited);
        }
        return c;
    }

    // The function to do DFS traversal. It uses recursive DFSUtil()
    int DFS(int v)
    {
        int c=0;
        // Mark all the vertices as not visited(set as
        // false by default in java)
        boolean visited[] = new boolean[V];

        // Call the recursive helper function to print DFS traversal
        c=DFSUtil(v, visited);
        return c;
    }
  }*/
    public static void main (String args[]) throws IOException{
       //Reader in = new Reader();
       FastReader in=new FastReader();
       BufferedOutputStream out=new BufferedOutputStream(System.out);
       StringBuilder sb = new StringBuilder();
       //Scanner in=new Scanner(System.in);

       int n=in.nextInt(),k=in.nextInt(),i;
       int[]a=new int[n];
       for(i=0;i<n;i++)
         a[i]=in.nextInt();
       Arrays.sort(a);
       sb.append(a[n-k]+"\n");

       out.write(sb.toString().getBytes());
       out.flush();
    }

    public static int solve(int n){
      int t=n/2,p=n-t;
      return (t*(t+1))-p*p;
    }

    public static long isPrime(long a){
      long i;
      for(i=2;i<=(long)Math.sqrt(a);i++){
        if(a%i==0)
          return i;
      }
      return -1l;
    }


  public static int binarySearch(int []a,int s, int e,int k){
     int mid=s+(e-s)/2;
     if(s<=e){
       if(k<=a[mid]&&k>a[mid-1])
        return mid;
       if(a[mid]<k)
        return binarySearch(a,mid+1,e,k);
       if(a[mid]>k)
        return binarySearch(a,s,mid-1,k);
     }
     return -1;
   }
/*
public static int binarySearch(int arr[], int first, int last, int key){
      if (last>=first){
          int mid = first + (last - first)/2;
          if (arr[mid] == key){
          return mid;
          }
          if (arr[mid] > key){
          return binarySearch(arr, first, mid-1, key);//search in left subarray
          }else{
          return binarySearch(arr, mid+1, last, key);//search in right subarray
          }
      }
      else{
        if(first>=arr.length)
          first=arr.length-1;
        if(key<arr[first])
          return first-1;
        else
          return first;
      }
  }
*/   public static void insertionSort(String []a){
     int i,n=a.length;
     for(i=1;i<n;i++){
       for(int j=i;j>0;j--){
         if(a[j].length()>a[i].length()){
           String k=a[j];
           a[j]=a[j-1];
           a[j-1]=k;
         }
         else
          break;
       }
     }
     for(int j=0;j<a.length;j++)
      System.out.print(a[j]+" ");
   }


   public static void mergeSort(int []a,int s,int e ){

     if(s>=e||e-s==1)
      return;
     {
       int m=(s+e)/2;

       mergeSort(a,s,m);
       mergeSort(a,m,e);

       merge(a,s,m,e);
     }
   }

   public static void merge(int []a,int s, int m,int e){
     int []z=new int[e-s];
     int k1=s,k2=m,i=0;

     while(k1!=m && k2!=e){
       z[i++]=a[k1]<=a[k2]?a[k1++]:a[k2++];
     }
     while(k1!=m)
      z[i++]=a[k1++];
     while(k2!=e)
      z[i++]=a[k2++];
     for(i=s;i<e;i++){
       a[i]=z[i-s];
     }
   }
   static class Helper{
     int u,v,w;
     Helper(int u,int v,int w){
       this.u=u;
       this.v=v;
       this.w=w;
     }
   }
   public static void countsort(long arr[],int n,long place)
  {
          int i,range=100000;
          int freq[]=new int[range];         //range for integers is 10 as digits range from 0-9
          long output[]=new long[n];
          for(i=0;i<n;i++)
                  freq[(int)((arr[i]/place)%range)]++;
          for(i=1;i<range;i++)
                  freq[i]+=freq[i-1];
          for(i=n-1;i>=0;i--)
          {
                  output[freq[(int)((arr[i]/place)%range)]-1]=arr[i];
                  freq[(int)((arr[i]/place)%range)]--;
          }
          for(i=0;i<n;i++){
                  arr[i]=output[i];
                  //sb.append(arr[i]+" ");
          }
          //sb.append("\n");
  }
/*  public static void radixsort(int arr[],int n,int maxx,StringBuilder sb)
  {
          int mul=1;
          while(maxx>0)
          {
                  countsort(arr,n,mul,sb);
                  mul*=10;
                  maxx/=10;
          }
  }
*/

}
