#include #include #include #include #include using namespace std; typedef long long ll; const ll INF = 1e10; vector split(string str, char del){ vector ret; string cutoff = ""; for(int i = 0; i < str.length(); i++){ if(str[i] == del){ if(cutoff != "") ret.push_back(cutoff); cutoff = ""; }else{ cutoff += str[i]; } } if(cutoff != "") ret.push_back(cutoff); return ret; } int main(){ int n; cin >> n; ll integer = 0, decimal = 0; for(int i = 0; i < n; i++){ string line; cin >> line; if(count(line.begin(), line.end(), '.')){ vector v = split(line, '.'); integer += stoll(v[0]); while(v[1].size() != 10) v[1] += "0"; decimal += stoll(v[1]) * (v[0][0] == '-' ? -1 : 1); }else{ integer += stoll(line); } } if(abs(decimal) >= INF){ integer += decimal/INF; decimal %= INF; } cout << integer << "." << left << setw(10) << setfill('0') << decimal << endl; return 0; }