Given a stack of N integers.You need to maximize the top element of the stack after performing exactly K operations.In one operation, you can either pop an element from the stack or push any popped element into the stack. If the stack becomes empty after performing K operations and there is no other way for the stack to be non-empty, print -1.

Input format :

The first line of input consists of two space-separated integers N and K.
The second line of input consists N space-separated integers denoting the elements of the stack. The first element represents the top of the stack and the last element represents the bottom of the stack.

Output format :

Print the maximum possible top element of the stack after performing exactly K operations.

Sample Input

6 4

1 2 4 3 3 5

Sample Output

4