#include #include #include #include int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); int n; std::string input, inputInt, inputDec; long long int ansInt = 0, ansDec = 0; std::cin >> n; for(int i=0; i> input; if(input.find('.') == std::string::npos){ ansInt += std::stoi(input); }else{ std::istringstream ist(input); std::getline(ist, inputInt, '.'); ansInt += std::stoi(inputInt); std::getline(ist, inputDec); while(inputDec.size()<10){ inputDec += '0'; } ansDec += static_cast(std::stod(inputDec)) * ((input[0]=='-') ? -1 : 1); } } ansInt += ansDec/10000000000; ansDec %= 10000000000; inputDec = std::to_string(ansDec); while(inputDec.size()<10){ inputDec += '0'; } std::cout << ansInt << '.' << inputDec << "\n"; return 0; }