Question
Courier Speed Limit

A courier traverses n segments. At integer speed v, segment d_i takes \lceil d_i/v\rceil time. After every segment except the last, there is a fixed pause of p. Find the minimum integer speed finishing within H, or -1 if impossible.

Input

First line: KaTeX can only parse string typed expression.
Second line: segment lengths.

Output

Print the minimum feasible speed or -1.

Example
Input:
4 12 1

7 3 9 5
Output:
3
Explanation:
At speed 3, travel times are 3, 1, 3, and 2. Including three pauses, total time is 12. Speed 2 needs more than 12, so 3 is minimum.

Online