from decimal import Decimal import sys input = sys.stdin.readline N = int(input()) ans = Decimal(0) d = {} 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)