Asgard is under attack by an enemy alien force. It's now up to Thor and Loki to save the city. However, there is only a narrow opening to attack the aliens so only one of them can attack at a time.
Thor attacks first with his hammer. The hammer has two modes of attack that he uses with equal probability. The first mode kills 5 aliens whereas the other mode kills 10 aliens. Since the hammer is pretty heavy, he allows Loki to attack after his move.
Loki's Scepter has 3 modes of attack that kill 1, 2 and 3 aliens respectively. All three modes are used with equal probability. Loki continues his attacks repeatedly until the third mode (that kills 3 aliens) is used. After that, Thor resumes the attack.
This cycle continues until all the aliens are killed. Given the number of aliens in the enemy army, you need to find the expected number of kills by Thor.
Input: First line of the input contains T (1<=T<=100), the number of test cases. The next T lines each contain a positive integer N (1<=N<=10000) denoting the number of aliens in the enemy army.
Output: Output T lines with each line containing the expected kills by Thor. Print the expectation as a real number rounded to exactly 6 decimal places.
In the first two cases, no matter which mode Thor uses, he kills all the aliens in a single attack. In the third case, with probability 0.5 Thor kills 5 enemies in the first move and then Loki kills the last enemy; with probability 0.5 Thor kills all 6 enemies in a single attack. Thus, expected number of kills is 5.5.