FIBPOS - Fibonacci Terms
|The fibonacci sequence is a sequence of integers in which each number is equal to the sum of the two preceding numbers. The first two integers in the sequence are both 1. Formally:
We'll define the fibonacci position of an integer greater than or equal to 1 as follows:
FP(1)=2 (first rule)
FP(5)=5 (second rule F5 = 5)
FP(4)=4.5 (third rule, is right in the middle of F4 = 3 and F5 = 5)
Given an integer n, find its fibonacci position as a double.
First line contains T <= 10. Following each line contains an integer 1 <= n <= 108.
For each testcase, print the fibonacci position of n, rounded to 6 places of decimal.