#include #include #include #include using namespace std; #define RREP(i,s,e) for (i = e-1; i >= s; i--) #define rrep(i,n) RREP(i,0,n) #define REP(i,s,e) for (i = s; i < e; i++) #define rep(i,n) REP(i,0,n) #define INF 1e8 typedef long long ll; int main() { int i, n; ll ua, la; cin >> n; ua = la = 0; rep (i,n) { string s; ll u, l = 0; size_t len; cin >> s; u = stoll(s,&len); if (len < s.size()) { string t; t = s.substr(len+1); while (t.size() < 10) t.push_back('0'); l = stoll(t); } ua += u; if (stod(s) > 0) la += l; else la -= l; if (la < 0) { la += 10000000000; ua--; } } cout << ua + la / 10000000000 << '.' << setw(10) << setfill('0') << la % 10000000000 << endl; return 0; }