Exchange Rates

Time limit1sMemory limit128 MB

Problem

The Canadian dollar (the Loonie) is trading almost at par with the U.S. dollar (the Greenback), so you decide to use your $1000 entrance scholarship for a bit of currency speculation. A crystal ball reveals the closing exchange rate between Canadian and U.S. dollars for each of the next several days.

On any single day you may convert all of your money from Canadian dollars to U.S. dollars, or from U.S. dollars to Canadian dollars, at that day's rate. Every conversion charges a 3% commission, and the result is rounded down to the nearest cent (any fraction of a cent is lost).

You start with $1000 in Canadian dollars. Assuming the predictions are correct, what is the maximum amount of money, in Canadian dollars, that you can hold after the last day?

Input

The input consists of several test cases and ends with a line containing a single 0.

Each test case begins with an integer $d$ ($0 < d \le 365$), the number of days the crystal ball predicts. The next $d$ lines each contain one real number: the price of one U.S. dollar in Canadian dollars on that day, in chronological order.

Output

For each test case, output on a single line the maximum amount of money, in Canadian dollars and cents, that you can hold after the last predicted day. You may exchange on any subset of the days, processed in chronological order. Print the amount with exactly two digits after the decimal point.