Question
Maximum Deep Work Sprint Length

An SDE is planning focused deep work sessions for the next n days.

On day i, they can complete a_i units of productive work.

They want to choose exactly k non-overlapping work sprints. Each sprint must be a contiguous group of days, and every chosen sprint must have length at least L.

The total productivity is the sum of a_i over all days included in the chosen sprints.

Your task is to find the maximum possible value of L such that the SDE can choose exactly k valid sprints with total productivity at least T.

If it is impossible even for L = 1, print 0.

Input

The first line contains three integers KaTeX can only parse string typed expression, KaTeX can only parse string typed expression, and KaTeX can only parse string typed expression — the number of days, the number of work sprints, and the required total productivity.

The second line contains KaTeX can only parse string typed expression integers KaTeX can only parse string typed expression — the productive work units for each day.

Output

Print a single integer — the maximum sprint length KaTeX can only parse string typed expression such that exactly KaTeX can only parse string typed expression non-overlapping sprints of length at least KaTeX can only parse string typed expression can achieve total productivity at least KaTeX can only parse string typed expression.

Example
Example 1:
Input
7 2 18

3 2 7 10 1 4 6
Output
3
Explanation

For KaTeX can only parse string typed expression, choose sprint KaTeX can only parse string typed expression with productivity KaTeX can only parse string typed expression and sprint KaTeX can only parse string typed expression with productivity KaTeX can only parse string typed expression. The total productivity is KaTeX can only parse string typed expression, which is at least KaTeX can only parse string typed expression.


For KaTeX can only parse string typed expression, it is impossible to choose exactly KaTeX can only parse string typed expression non-overlapping sprints because at least KaTeX can only parse string typed expression days are required, but only KaTeX can only parse string typed expression days are available.

Therefore, the maximum valid value of KaTeX can only parse string typed expression is KaTeX can only parse string typed expression.

Online