import sys input = sys.stdin.readline from decimal import * getcontext().prec = 50 N=int(input()) X=[int(input()) for i in range(N)] ANS=[] score=Decimal(0) for x in X: x*=10**40 MIN=Decimal(0) MAX=Decimal(x) for i in range(100): mid=(MAX+MIN)/2 if mid*mid>x: MAX=mid else: MIN=mid score+=(Decimal(MAX+MIN)/2/10**20) ANS.append(score) print("\n".join(map(str,ANS)))