#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; long long MOD = 1000000007; vector split(const string &str, char sep) { vector v; // 分割結果を格納するベクター auto first = str.begin(); // テキストの最初を指すイテレータ while( first != str.end() ) { // テキストが残っている間ループ auto last = first; // 分割文字列末尾へのイテレータ while( last != str.end() && *last != sep ) // 末尾 or セパレータ文字まで進める ++last; v.push_back(string(first, last)); // 分割文字を出力 if( last != str.end() ) ++last; first = last; // 次の処理のためにイテレータを設定 } return v; } int main() { int N; cin >> N; vector VS(N); for ( int i = 0; i < N; i++ ) { cin >> VS[i]; } long long a,b; a = b = 0; for ( int i = 0; i < N; i++ ) { vector s = split(VS[i],'.'); a += stoll( s[0] ); if ( s.size() > 1 ) { string t = s[1]; while ( t.length() < 10 ) { t += '0'; } long long c = ( s[0][0] == '-' ) ? -stoll(t) : stoll(t); b += c; } } a += b/10000000000; b %= 10000000000; // cout << a << endl; // cout << b << endl; if ( a == 0 && b < 0 ) { cout << "-"; } else if ( a > 0 && b < 0 ) { a--; b += 10000000000; } else if ( a < 0 && b > 0 ) { a++; b = 10000000000-b; if ( a == 0 ) { cout << "-"; } } if ( b < 0 ) { b = -b; } string x = to_string(b); string y = ""; for ( int i = 0; i < 10-x.length(); i++ ) { y += '0'; } cout << a << "." << y << x << endl; return 0; }