#include #include #include #include #include #include #include #include #include // require sort next_permutation count __gcd reverse etc. #include // require abs exit atof atoi #include // require scanf printf #include #include // require accumulate #include // require fabs #include #include #include #include // require setw #include // require stringstream #include // require memset #include // require tolower, toupper #include // require freopen #include // require srand #define rep(i,n) for(int i=0;i<(n);i++) #define ALL(A) A.begin(), A.end() #define DIGIT 1e10 using namespace std; typedef long long ll; typedef pair P; typedef pair LL; LL func (string s ){ ll sign = (s[0] == '-' ? -1LL : 1LL ); rep (i, s.length() ) if (s[i] == '.' ) s[i] = ' '; stringstream ss (s ); ll integer = 0LL; string decimal = ""; ss >> integer >> decimal; while (decimal.length() < 10 ){ decimal += '0'; } // end while stringstream tt (decimal ); ll dec; tt >> dec; return LL (integer, sign*dec ); } string ll2s (ll m ){ stringstream ss; ss << m; string res; ss >> res; while (res.length() < 10 ){ res = '0' + res; } // end while return res; } int main() { ios_base::sync_with_stdio(0); int N; cin >> N; vector num(N); rep (i, N ){ string s; cin >> s; num[i] = func (s ); } // end rep ll sumi = 0LL, sumd = 0LL; rep (i, N ) sumi += num[i].first, sumd += num[i].second; while (sumd < 0LL ) sumi--, sumd += DIGIT; while (sumd >= DIGIT ) sumi++, sumd -= DIGIT; if (sumi < 0LL && sumd > 0LL ) sumi++, sumd = DIGIT - sumd; printf ("%lld.%010lld\n", sumi, sumd ); return 0; }