N = int(input()) d_total = 0 f_total = 0 for i in range(N): s = input().strip().split(".") d = int(s[0]) if len(s) == 2: f = int(s[1])*(10**(10-len(s[1]))) else: f = 0 if "-" in s[0]: f *= -1 d_total += d f_total += f d_total += f_total // (10**10) f_total -= (f_total // (10**10)) * (10**10) print("%d.%010d"%(d_total, f_total))