You are given a sequence of integers of length n and integer number k. You should print any integer number x in the range of [1; 10^9] (i.e. 1 ≤ x ≤ 10^9) such that exactly k elements of given sequence are less than or equal to x.

Note that the sequence can contain equal elements.

If there is no such x, print "-1" (without quotes).

Input

The first line of the input contains integer numbers n and k (1 ≤ n ≤ 2 ⋅ 10^5, 0 ≤ k ≤ n). The second line of the input contains n integer numbers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 10^9) — the sequence itself.

Output

Print any integer number x from range [1; 10^9] such that exactly k elements of given sequence is less or equal to x.

If there is no such x, print "-1" (without quotes).

Examples

Input

7 4
3 7 5 1 10 3 20


Output

6

Input

7 2
3 7 5 1 10 3 20


Output

-1

Note

In the first example 5 is also a valid answer because the elements with indices [1, 3, 4, 6] is less than or equal to 5 and obviously less than or equal to 6.

In the second example you cannot choose any number that only 2 elements of the given sequence will be less than or equal to this number because 3 elements of the given sequence will be also less than or equal to this number.
import java.util.*;
import java.io.*;
public class Red {
    static FastScanner f;
    static PrintWriter pw = new PrintWriter(System.out);
    static long mod = 1000_000_007;
    static long oo = Long.MAX_VALUE;
    static int ooo = Integer.MAX_VALUE;
    static double eps = 1e-12;
    static int n , arr[];

    // Number of integers less than equal to x ?
    static int cnt(int x) {
        for (int i = 0; i < arr.length; ++i) {
            if (arr[i] > x) return i;
        }
        return arr.length;
    }

    public static void solve()throws IOException {
        n = f.ni(); int k = f.ni();

        arr = new int[n];

        for (int i = 0; i < n; ++i) arr[i] = f.ni();

        sort(arr);

        int lo = 1 , hi = (int)1e9;
        while (lo <= hi) {
            int mid = lo + (hi - lo) / 2;
            int curr = cnt(mid);
            if (curr == k) {
                pn(mid);
                return;
            }

            if (curr > k) hi = mid - 1;
            else lo = mid + 1;
        }
        pn(-1);
    }    
    
    public static void main(String args[])throws IOException {
        go();
        boolean test_cases = false;
        int t = test_cases ? f.ni() : 1;
        while (t --> 0) solve();
        pw.flush();
        pw.close(); 
    }

    public static void go()throws IOException {
        if (System.getProperty("ONLINE_JUDGE") == null) {
            f = new FastScanner("");
        }
        else f = new FastScanner(System.in);
    }

    public static class FastScanner {
        StringTokenizer st;
        BufferedReader br;
 
        public FastScanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public FastScanner(String str) {
            try {
                br = new BufferedReader(new FileReader("inp.txt"));
            }
            catch (Exception e) {
                e.printStackTrace();
            }
        }
 
        public String next()throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }
 
        public int ni() throws IOException {return Integer.parseInt(next());}
 
        public long nl() throws IOException {return Long.parseLong(next());}
 
        public String nextLine() throws IOException {return br.readLine();}

        public double nd() throws IOException {return Double.parseDouble(next());}
    }

    public static long mul(long a , long b) {
        return ((a % mod) * (b % mod)) % mod;
    }

    public static void sort(int a[]) {
        ArrayList<Integer> x = new ArrayList<>();
        for (int i : a) x.add(i);
        Collections.sort(x);
        for (int i = 0; i < a.length; ++i) a[i] = x.get(i);
    }
    
    public static void sort(long a[]) {
        ArrayList<Long> x = new ArrayList<>();
        for (Long i : a) x.add(i);
        Collections.sort(x);
        for (int i = 0; i < a.length; ++i) a[i] = x.get(i);
    }

    public static void sort(ArrayList<Integer> arr) {Collections.sort(arr);}

    public static void pn(Object o){pw.println(o);}
        
    public static void p(Object o){pw.print(o);}
        
    public static void pni(Object o){pw.println(o);pw.flush();}

    static int gcd(int x , int y) {
        if (y == 0) return Math.abs(x);
        return gcd(y , x % y);
    }
}