#include #include #include using namespace std; signed main() { int n; cin >> n; long long ans_i = 0; long long ans_f = 0; while (n--) { string s; int i; long long tmp_i = 0, tmp_f = 0; //tmp_i + tmp_f * 10^(-10)が与えられた!! cin >> s; for (i = (s[0] == '-'); i < s.length() && s[i] != '.'; i++) { tmp_i *= 10; tmp_i += s[i] - '0'; } if (s[i] == '.') { i++; } int shift = 10 - ((int)s.length() - i); for (; i < s.length(); i++) { tmp_f *= 10; tmp_f += s[i] - '0'; } for (i = 0; i < shift; i++) { tmp_f *= 10; } ans_i += (s[0] == '-') ? -tmp_i : tmp_i; ans_f += (s[0] == '-') ? -tmp_f : tmp_f; if (ans_f >= 10000000000) { ans_i++; ans_f -= 10000000000; } //桁上がり if (ans_f < 0) { ans_i--; ans_f += 10000000000; } //cout << ans_i << " " << ans_f << endl; } if (ans_i >= 0) printf("%lld.%010lld\n",ans_i, ans_f); else { if (ans_f < 0) printf("-%lld.%010lld\n", abs(ans_i), abs(ans_f)); else printf("-%lld.%010lld\n", abs(ans_i + 1), abs(ans_f - 10000000000)); } return 0; }