A keen entomologist, Vasya studied an ant population in the neighboring forest. He discovered a huge anthill and, after spending a lot of time, determined that $$$k$$$ ants lived in it.
Due to the imposed quarantine, Vasya could not continue his field research. However, Vasya knows that there are $$$n$$$ anthills in total in the forest, which means that one may try to apply Zipf's law to estimate their size.
Zipf's law states: if $$$k$$$ insects live in the largest anthill, then in the second largest will be approximately half as many ($$$k / 2$$$), in the third three times less ($$$k / 3$$$), and in the $$$i$$$-th largest will live $$$i$$$ times less than ($$$k / i$$$).
Vasya made a forecast – a series of integers $$$c_1, c_2, ..., c_n$$$, where $$$c_i = k / i$$$, rounded to the nearest integer (according to mathematical rules, that is, numbers like $$$1.5, 2.5, ... $$$ were rounded up).
Unfortunately, the ants living on the home ant farm did not appreciate the researcher's impulse and damaged his notes. The saddest thing is that the original number $$$k$$$ was also damaged. However, some of the $$$c_i$$$ numbers have been preserved. Help Vasya recover the lost data.
Write a program that uses the preserved records $$$c_i$$$ to find the minimum initial number $$$k$$$. If there are several such numbers, print the minimum of them.
The first line of input data contains the single integer $$$n$$$ ($$$3 \leq n \leq 1\,000$$$) – the number of anthills in the forest.
The second line contains $$$n$$$ entries separated by a space – the sequence $$$c_1, c_2, ..., c_n$$$. If the entry $$$c_i$$$ is not affected by ants, then the integer $$$c_i = k / i$$$ ($$$0 \leq c_i \leq 2\,147\,483\,647$$$) is indicated there, rounded to the nearest integer. If the record is damaged, then a question mark is indicated «?». It is guaranteed that the numbers $$$c_i$$$ are not contradictory and the desired number $$$k$$$ exists. It is also guaranteed that sequence always starts with «?».
In a single line, print an integer – the minimum value of $$$k$$$ from satisfying the conditions of the problem.
3? 3 2
5
3? 4 ?
7
| Name |
|---|


