A Minimum Land Price#2628

A Minimum Land Price

1 second
64 megabytes
Very easy

Manager of ACM-ICPC Thailand Contest Council plans to buy land in Phuket to build an office for the regularly held national programming camp and programming contest. The land price in Phuket increases every year, following an exponential growth curve with respect to time. If land has an initial cost L_i and is bought in years from now, its price will be 2 \times (L_i)^t. All land prices are unique. ACM-ICPC can purchase only one piece of land per year. You must help the manager buy the lands at the minimum total price within a budget of billion baht (5 \times 10^6 million).

For example, if you want to buy pieces of land with initial costs , , and in three consecutive years, the total price is calculated as follows:

(2 \times 7^1) + (2 \times 2^2) + (2 \times 10^3) = 14 + 8 + 2000 = 2022

million baht.

Input

The first line contains an integer (1 \leq T \leq 10), the number of test cases. Each test case contains integer values L_i, the cost of each land in million baht. There are less than pieces of land in each test case. A line with (zero) indicates the end of each test case.

Output

For each test case, print the minimum total price of purchasing all lands. If the total price exceeds the budget ( billion baht), print Too expensive.

Examples

Example 1

Loading
Loading