from decimal import Decimal, getcontext import sys input = sys.stdin.readline N = int(input()) ans = Decimal(0) d = {} getcontext().prec = 17 for _ in range(N): x = int(input()) if x in d: ans += d[x] else: d[x] = Decimal(x).sqrt() ans += d[x] print(ans)