import decimal import sys input = sys.stdin.readline def one_str(): return input() def many_int(): return list(map(int, input().split())) from decimal import * getcontext().prec = 16 input_count = 0 N = many_int()[0] now = 0 dicts = {} A = [] for i in range(N): num = many_int()[0] A.append(num) if num not in dicts: dicts[num] = decimal.Decimal(num**(1/2)) now = 0 for a in A: now += dicts[a] print(now)