As a summer gift, Fiona receives flower seeds. She decides to plant them such that each seed has its own pot. She then lines the pots up in a line. Each day, one of the flowers naturally grows by cm. The rest of the flowers remain the same height. Initially, all flowers start at a height of . By the end of the summer, Fiona wants the flower pot to contain a flower of exactly height cm. However, she is impatient, and wants them to grow up as fast as possible. Each day, Fiona can also artificially increase the heights of some of the flowers by (she has magic powers).
If the flowers naturally grow optimally, what is the minimum amount of days Fiona has to wait before the pot contains a flower of height ?
Constraints
Input Specification
The first line contains a single integer .
The second line contains single space-separated integers, the being .
Output Specification
Output a single integer, the minimum amount of days Fiona has to wait for the plants to be of desired heights.
Sample Input
5
3 5 6 2 4
Sample Output
4
Sample Explanation
After day one, Fiona's plants look like .
After day two, Fiona's plants look like .
After day three, Fiona's plants look like .
After day four, Fiona's plants look like .
Note that there may be other ways to reach the same arrangement in the same amount of days.
Comments