e-olymp
Problems

Construction

Construction

After finishing his chalet construction, Stepan still has n wooden boards, with lengths l1, ..., ln. He decided to build a fishing deck on a lake using these boards.

Stepan believes that the longer deck is, the more fish he will catch!

Moreover, Stepan, as all fishermen, is very superstitious and trusts all omens. One of it – the deck can be build using whole boards only (boards can be cut but not joined). Now Stepan is interested what maximum deck length d can be obtained, if needs to use m boards.

Input

Contains integers n, m, li (1n10000, 1m, li2 *109) – number of available boards, number of boards to be used to build the deck and the lengths of available boards.

Output

Print one integer d – the maximum possible length of the deck or 0 (zero).

Time limit 1 second
Memory limit 128 MiB
Input example #1
4 4
5 5 3 6
Output example #1
3
Source 2014 ACM-ICPC Ukraine, 2nd Round Ukraine, September 13, Problem F