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 total = str(d_total * 10**10 + f_total) d = total[:len(total)-10] key = 0 for i in d[::-1]: if i != "0": break key -= 1 d_total = int(d[:len(d)-key]) f_total = int(total[len(total)-10:]) print("%d.%010d"%(d_total, f_total))