#include #include namespace mp = boost::multiprecision; using ll = mp::cpp_int; using namespace std; void ins() {} templatevoid ins(T& v,Rest&... rest){cin>>v;ins(rest...);} #define rep(i,n) for(int i=0,_i=(n);i<_i;++i) int main() { int N; cin >> N; ll ans = 0; rep(i, N) { string s; cin >> s; bool negative = s[0] == '-'; if (negative) s = s.substr(1); auto pos = s.find("."); if (s == "0") continue; if (pos == string::npos) s += "0000000000"; else { int len = s.size() - 1 - pos; rep(j, 10-len) s += "0"; s = (s.substr(0, pos) == "0" ? "" : s.substr(0, pos)) + s.substr(pos+1); } while (s[0] == '0') s = s.substr(1); if (negative) s = '-' + s; ans += ll(s); } bool negative = ans < 0; if (negative) ans *= -1; string s = ans.str(); if (ans == 0) { cout << 0 << endl; return 0; } if (negative) cout << "-"; if (s.size() <= 10) { string zero = ""; rep(i, 10-(s.size()-(s[0] == '-'))) zero += '0'; cout << "0." << zero << s << endl; } else cout << s.substr(0, s.size()-10) << "." << s.substr(s.size()-10) << endl; return 0; }