Abhi Ram analyses london stock exchange and invests in a software company C-.gate . He wants to sell his shares after 5 weeks.

Given the investment  m, increase or decrease of share prices of 5 weeks(+/- pi) , help him to calculate his net profit or loss percentage(n%) of his investment to establish his own company KMC.

-----Input:-----

- The first line contains an integer T which denotes the number of test cases.
- Each test case comprises of two lines: the first line contains the integer m which denotes the amount invested.

The second line consists of five space separated integers(p1, p2, p3, p4, p5) each preceeded by + (increase) or - (decrease) which give the percentage of change in share prices over 5 weeks.
.

-----Output:-----
The output contains a single number n which gives the percentage of profit or loss preceeded by + (profit) or - (loss).

-----Constraints:-----
- 1 ≤ T ≤ 100
- 1 ≤ m ≤ 105
- -100 ≤ pi ≤ 100

-----Example:-----
Input:
2
10000
+5 -3 -2 +10 +15
6256250
-24 +22 +4 -16 +20

Output:
+26.2634
-2.79977

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


Solutions: