#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; ll integer = 0, decimal = 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) integer += (negative ? -1 : 1) * stoll(s); else { integer += (negative ? -1 : 1) * stoll(s.substr(0, pos)); int len = s.size() - 1 - pos; rep(j, 10-len) s += "0"; s = s.substr(pos+1); while (!s.empty() && s[0] == '0') s = s.substr(1); if (!s.empty()) decimal += (negative ? -1 : 1) * stoll(s); } } integer += decimal / 10000000000LL; decimal %= 10000000000LL; if (integer >= 0 && decimal >= 0 || integer <= 0 && decimal <= 0) { cout << integer << "." << setfill('0') << setw(10) << abs(decimal) << endl; } else { if (decimal != 0) --integer; cout <