Financial help --------------- Some years from now, many of you will be in the market for a condo. Here is a problem that you may face. Let us assume you currently have $10,000 and you want to use it for down payment for the condo. Since you are not buying right now, it makes sense to invest the money until you use it. One possibility is buying stocks or mutual funds. However, depending on the market conditions, you risk losing money and not having enough to make a down payment on your dream condo. One way to almost eliminate the risk is by investing in Certificate of Deposits (CD). A CD is a fixed term investment with a guaranteed rate of interest. To illustrate, let's say you buy a 1-year CD for $1000 and your interest rate is 5%, then a year after purchasing the CD, you get back $1050. Unfortunately, most investment interest is taxable and CDs are no exceptions. So you need to pay tax on the $50 you earned as interest. Assume that the tax becomes payable when you actually receive the money. So for a 3-year CD you do not pay any tax in the first two years. Suppose you are buying k years from now. Suppose also that you know the interest rates of one-year CDs for each of the k years. You also know the interest rate for a k-year CD. You are comparing the following strategies: (a) invest the savings in a k-year CD (b) invest the savings in a 1-year CD. At the end of the year, you receive the invested amount plus interest. From this, you pay taxes and reinvest the remaining amount in a 1-year CD. Repeat this process for k years (except that at the end of k years you do not invest again). Your job is to write a program to determine which one is more profitable for you and by how much. Assume that the tax rate is 30%. Input The input consists of many instances of this problem. The data for each instance is on a new line. The last line of input has a single zero. This line should not be processed. Each instance is specified by an integer k, the k-year CD rate in decimal (a floating point number), followed by k interest rates in decimal notation (floating point numbers) for the k years, each for a 1-year CD. You may assume k to be no more than 15, and that all interest rates are positive. Output For each instance, output a single integer. This is the excess amount you make by opting for a k-year CD (note that this may be negative), rounded to the nearest whole dollar. Sample Input 2 0.2 0.1 0.1 2 0.4 0.1 0.1 0 Sample Output -49 1351