#BS0000025. Máy cưa gỗ (EKO)

Máy cưa gỗ (EKO)

EKO

Source: SPOJ

Version: Phuoc Hung OJ Extended

Problem Statement

There are NN trees with heights hih_i. A saw set at integer height HH cuts off the part above HH, producing ∑i=1Nmax⁡(0,hi−H)\sum_{i=1}^{N}\max(0,h_i-H) units of wood. Find the maximum HH that still produces at least MM units.

Input

The first line contains N,MN,M. The second line contains the tree heights.

Output

Print the maximum valid saw height.

Subtasks

  • Subtask 1 — 20%: 1≤N≤10001\le N\le1000.
  • Subtask 2 — 30%: 1≤N≤1051\le N\le10^5.
  • Subtask 3 — 50%: 1≤N≤1061\le N\le10^6, 1≤M≤2⋅1091\le M\le2\cdot10^9, 1≤hi<1091\le h_i<10^9. The sum of all heights is greater than MM.

Examples

Input

4 7
20 15 10 17

Output

15

Explanation

At H=15H=15 we obtain 5+2=75+2=7 units. At H=16H=16 we obtain only 55, so 1515 is optimal.