#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define BET(a,b,c) ((a)<=(b)&&(b)<(c)) #define FOR(i,n) for(int i=0,i##_end=(int(n));i VI; typedef vector VVI; long long parse(string s){ long long v = 0 ; FOR(i,SZ(s)) v = v * 10 + (s[i] - '0'); return v; } long long myabs(long long x){ return max(x,-x); } int main() { int N; cin>>N; long long integer = 0, decimal = 0; FOR(i,N){ string s; cin>>s; int sign = 1; if(s[0] == '-') { sign = -1; s = s.substr(1); } auto dot = s.find('.'); if(dot != string::npos){ integer += sign * parse(s.substr(0, dot)); string d = s.substr(dot + 1); d.resize(10, '0'); decimal += sign * parse(d); }else{ integer += sign * parse(s); } } long long carry = decimal / 10000000000LL; integer += carry; decimal %= 10000000000LL; bool minus = false; if(integer < 0 || (integer == 0 && decimal < 0)) minus = true; printf("%s%lld.%010lld", minus ? "-" : "", myabs(integer), myabs(decimal)); return 0; }