For mushrooms#8662

For mushrooms

1 second
64 megabytes
Very easy

The children were picking mushrooms in the forest. Petya did not find any mushrooms and burst into tears (because he was the smallest among all the children). The other children were polite and decided that everyone would give Petya the same number of mushrooms. However, nobody wanted to give mushrooms without a definite plan. It was then decided that each of the children would give Petya the same minimal number of mushrooms, so that Petya would receive in total more mushrooms than any child would have left. Determine whether this is possible, and if so, how many mushrooms each child should give to Petya.

Input

The first line contains a single integer (1 \le n \le 10^5) — the number of friends picking mushrooms. The second line contains n - 1 integers a_1, a_2, \ldots, a_{n-1} (1 \le a_i \le 10^9), where a_i is the number of mushrooms each child found.

Output

Print the number of mushrooms that Petya will receive from each child, or -1 if it is impossible.

Examples

Example 1

Loading
Loading