#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define ld long double #define EPS 0.0000000001 #define INF 1e9 #define LINF (ll)INF*INF #define MOD 1000000007 #define rep(i,n) for(int i=0;i<(n);i++) #define loop(i,a,n) for(int i=a;i<(n);i++) #define all(in) in.begin(),in.end() #define shosu(x) fixed< vi; typedef vector vs; typedef pair pii; typedef vector vp; int gcd(int a, int b){ if(b==0) return a; return gcd(b,a%b); } int lcm(int a, int b){ return a*b/gcd(a,b); } #define geta 10000000000LL pii f(string s){ int ret1 = 0, ret2 = 0; int i = 0; while(i < s.size() && s[i] != '.'){ ret1 *= 10; ret1 += s[i]-'0'; i++; } if(i < s.size()){ i++; rep(j,10){ ret2 *= 10; if(i+j < s.size())ret2 += s[i+j]-'0'; } } //cout << ret1 << " " << ret2 << endl; return pii(ret1,ret2); } signed main(void) { int n; cin >> n; int ans1 = 0, ans2 = 0; rep(i,n){ string s; cin >> s; if(s[0] == '-'){ pii t = f(s.substr(1)); ans1 -= t.first; ans2 -= t.second; }else{ pii t = f(s); ans1 += t.first; ans2 += t.second; } while(ans2 < 0){ ans1--; ans2 += geta; } while(ans2 >= geta){ ans1++; ans2 -= geta; } //cout << " " << ans1 << " " << ans2 << endl; } string ans = to_string(ans2); while(ans.size() < 10)ans = "0" + ans; cout << ans1 << "." << ans << endl; }