N=int(input()) S=0 for i in range(N): A=input() if "." in A: x=A.index(".") A+="0"*(11-len(A)+x) #print(x,len(A)-x,A) B="" for a in A: if a!=".": B+=a #print(B) S+=int(B) else: S+=int(A)*10**10 #print(S) if S>=0: S=str(S) while len(S)<11: S="0"+S S=S[:-10]+"."+S[-10:] print(S) else: S=-S S=str(S) while len(S)<11: S="0"+S print(S) S=S[:-10]+"."+S[-10:] print("-"+S)