#include using namespace std; std::ostream& operator<<( std::ostream& dest, __int128_t value ) { std::ostream::sentry s( dest ); if ( s ) { __uint128_t tmp = value < 0 ? -value : value; char buffer[ 128 ]; char* d = std::end( buffer ); do { -- d; *d = "0123456789"[ tmp % 10 ]; tmp /= 10; } while ( tmp != 0 ); if ( value < 0 ) { -- d; *d = '-'; } int len = std::end( buffer ) - d; if ( dest.rdbuf()->sputn( d, len ) != len ) { dest.setstate( std::ios_base::badbit ); } } return dest; } int main(void) { cin.tie(0); ios::sync_with_stdio(false); __int128 sum = 0; int n; string s; cin >> n; for (int i = 0; i < n; i++) { cin >> s; string a,b; for(int j=0;j=0;j--) { if(a[j]=='-') continue; temp += ((a[j]-'0')*num); num*=10; } if(a[0]=='-') { temp*=-1; } sum += temp; } string res; __int128 temp = abs(sum); while(temp > 0) { res = (char)(temp%10 + '0') + res; temp/=10; if(res.length()==10) { res = '.' + res; } } if(res.length()<10) { while(res.length()<10) { res = '0' + res; } res = "0." + res; } if(res[0]=='.') { res = '0' + res; } if(sum < 0) { res = '-' + res; } cout << res << '\n'; return 0; }