AT_abc457_d [ABC457D] Raise Minimum

Description

You are given a sequence $ A = (A_1, A_2, \ldots, A_N) $ of length $ N $ and an integer $ K $ . You can perform the following operation between $ 0 $ and $ K $ times, inclusive. - Choose an integer $ i $ satisfying $ 1 \le i \le N $ , and add $ i $ to $ A_i $ . Find the maximum possible value of $ \displaystyle \min_{1 \le i \le N} A_i $ for the sequence after the operations.

Input Format

The input is given from Standard Input in the following format: > $ N $ $ K $ $ A_1 $ $ A_2 $ $ \ldots $ $ A_N $

Output Format

Output the answer.

Explanation/Hint

### Sample Explanation 1 For example, by choosing $ i = 1 $ twice and $ i = 2 $ once, the sequence becomes $ (3, 4, 3) $ . In this case, the minimum value is $ 3 $ . It is impossible to make the minimum value $ 4 $ or greater, so output $ 3 $ . ### Constraints - $ 1 \le N \le 2 \times 10^5 $ - $ 1 \le A_i \le 10^{18} $ - $ 1 \le K \le 10^{18} $ - All input values are integers.