import random import time import copy import io, sys import re from decimal import * n = int(input()) v = int(1e10) res = Decimal("0.0") for i in range(n): res += Decimal(input()) print(res) res = int(res * v) v2 = abs(res) % v print(str(res // v) + '.' + "%010d" % v2)