#include using namespace std; using ll = long long; constexpr ll OFFSET = 1e10; int main() { int N; cin >> N; ll sum_int = 0; ll sum_float = 0; for (int n = 0; n < N; n++) { string s; cin >> s; string st[2]; int ind = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == '-') { st[0].push_back('-'); st[1].push_back('-'); continue; } if (s[i] == '.') { ind = 1; continue; } st[ind].push_back(s[i]); } ll integer = 0; ll floating = 0; integer = stoll(st[0]); if (not st[1].empty()) { const int size = (st[1][0] == '-') ? st[1].size() - 1 : st[1].size(); for (int i = 0; i < 10 - size; i++) { st[1].push_back('0'); } string ss; bool start = false; for (int i = 0; i < st[1].size(); i++) { if (st[1][i] == '0' and (not start)) { continue; } start = true; ss.push_back(st[1][i]); } floating = stoll(ss); } else { floating = 0; } // cout << integer << " " << floating << endl; sum_int += integer; sum_float += floating; } sum_int += sum_float / OFFSET; sum_float = sum_float % OFFSET; if ((sum_int < 0 and sum_float > 0)) { sum_int++; sum_float = OFFSET - sum_float; } else if ((sum_int > 0 and sum_float < 0)) { sum_int--; sum_float = OFFSET + sum_float; } const ll integer = sum_int + sum_float / OFFSET; cout << integer << "."; const ll floating = sum_float % OFFSET; ll num = floating; char s[10]; for (int i = 0; i < 10; i++) { s[9 - i] = '0' + num % 10; num /= 10; } for (int i = 0; i < 10; i++) { cout << s[i]; } cout << endl; return 0; }