#include #include #include int main() { int n; std::cin >> n; long long ans = 0; for (int i = 0; i < n; i++) { std::string no; std::cin >> no; int position = 0; auto point = std::find(no.begin(), no.end(), '.'); long long num; // 入力が小数なら小数点を取り整数化する if (point != no.end()) { position = point - no.begin(); no.erase(no.find('.'), 1); num = std::stoll(no); // 0.000000001を1の位になるように調整 for (int j = 0; j < 10 - (no.length() - position); j++) { num *= 10; } } else { num = std::stoll(no); for (int i = 0; i < 10; i++) { num *= 10; } } ans += num; } std::string s = std::to_string(ans); s.insert(s.length() - 10, "."); std::cout << s << std::endl; }