Print a single integer ― the maximum final height of the smallest flower.
Sample test(s) input6 2 3 2 2 2 2 1 1output
2input
2 5 1 5 8output
9Note
In the first sample beaver can water the last 3 flowers at the first day. On the next day he may not to water flowers at all. In the end he will get the following heights: [2, 2, 2, 3, 2, 2]. The smallest flower has height equal to 2. It's impossible to get height 3 in this test.