A harbor runs n ferries in parallel. Ferry i takes t[i] whole minutes to complete one crossing and immediately starts another, so within T minutes it completes floor(T / t[i]) crossings. All ferries start at minute 0.
The harbor must reach at least C completed crossings in total across all ferries. Find the fewest whole minutes T needed.
Input format
Line 1: two integers n and C.
Line 2: n space-separated integers, the per-crossing times.
Output format
A single integer: the minimum number of minutes to reach C total crossings.
Constraints
- 1 <= n <= 40
- 1 <= C <= 100000
- 1 <= each per-crossing time <= 1000