#include #include #include #include #include #include #define REP(i, a, b) for (int i = int(a); i < int(b); i++) #ifdef _DEBUG_ #define dump(val) cerr << __LINE__ << ":\t" << #val << " = " << (val) << endl #else #define dump(val) #endif using namespace std; typedef long long int ll; template vector make_v(size_t a, T b) { return vector(a, b); } template auto make_v(size_t a, Ts... ts) { return vector(a, make_v(ts...)); } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; ll a = 0, b = 0; REP(i, 0, n) { string s; cin >> s; int sign = 1; if (s[0] == '-') { s = s.substr(1); sign = -1; } auto it = s.find('.'); if (it != string::npos) { REP(j, s.size() - it, 11) { s += "0"; } } else { s += ".0000000000"; } it = s.find('.'); a += sign * atoll(s.substr(0, it).c_str()); b += sign * atoll(s.substr(it + 1).c_str()); if (a < 0 && b > 0) { a++; b = b - 10000000000; } else if (a > 0 && b < 0) { a--; b = 10000000000 + b; } if (b >= 10000000000) { b -= 10000000000; a++; } if (b <= -10000000000) { b += 10000000000; a--; } } if (b < 0) { b *= -1; if (a == 0) { cout << '-'; } } cout << a << "." << setw(10) << setfill('0') << b << endl; return 0; }