You are going to a village by bus.
You need hours to do an important task while your bus journey will take hours.
You know that the speed of the fan in the bus changes every hour. The fan is measured on a scale from 0 to 100, where 0 is very slow and 100 is too fast. Bus authority has told you the fan speed schedule for all n hours.
You want to do your task only when the fan is fast, as much as possible. So, you have to choose hours from your bus journey when you will do the task such that minimum speed of fan among the selected hours is maximum.
The first input line contains two integers and (, ) — the number of hours on the bus and the number of hours to do the task. The second line contains space-separated integers (), is the fan speed at the -th hour.
Print the minimum fan speed in which you will do the task.
Input | Output |
---|---|
15 1 0 78 24 24 61 60 0 65 52 57 97 51 56 13 10 | 97 |