import decimal import sys input = sys.stdin.readline decimal.getcontext().prec = 18 N = int(input()) dicts = {} output = [] now=0 for i in range(N): num = int(input()) if num not in dicts: dicts[num] = decimal.Decimal(num**(1/2)) now += dicts[num] output.append(now) print(*output, sep="\n")