#P977C. Less or Equal
Less or Equal
Description
You are given a sequence of integers of length and integer number . You should print any integer number in the range of (i.e. ) such that exactly elements of given sequence are less than or equal to .
Note that the sequence can contain equal elements.
If there is no such , print "-1" (without quotes).
The first line of the input contains integer numbers and (, ). The second line of the input contains integer numbers () — the sequence itself.
Print any integer number from range such that exactly elements of given sequence is less or equal to .
If there is no such , print "-1" (without quotes).
Input
The first line of the input contains integer numbers and (, ). The second line of the input contains integer numbers () — the sequence itself.
Output
Print any integer number from range such that exactly elements of given sequence is less or equal to .
If there is no such , print "-1" (without quotes).
Note
In the first example is also a valid answer because the elements with indices is less than or equal to and obviously less than or equal to .
In the second example you cannot choose any number that only elements of the given sequence will be less than or equal to this number because elements of the given sequence will be also less than or equal to this number.