#include using namespace std; typedef long long ll; typedef pair p_ll; template void debug(T itr1, T itr2) { auto now = itr1; while(now=0; i--) const ll MOD = pow(10,9)+7; const ll LLINF = pow(2,61)-1; const int INF = pow(2,30)-1; vector fac; void c_fac(int x=pow(10,6)+10) { fac.resize(x,true); rep(i,x) fac[i] = i ? (fac[i-1]*i)%MOD : 1; } ll inv(ll a, ll m=MOD) { ll b = m, x = 1, y = 0; while (b!=0) { int d = a/b; a -= b*d; swap(a,b); x -= y*d; swap(x,y); } return (x+m)%m; } ll nck(ll n, ll k) { return fac[n]*inv(fac[k]*fac[n-k]%MOD)%MOD; } ll gcd(ll a, ll b) { if (a> N; string A[N]; rep(i,N) cin >> A[i]; vector u[N], d[N]; vector isp(N,true); rep(i,N) { bool isu = true; rep(j, A[i].size()) { if (A[i][j]=='-') isp[i] = false; else if (A[i][j]=='.') isu = false; else { if(isu) u[i].push_back(A[i][j]-'0'); else d[i].push_back(A[i][j]-'0'); } } while (u[i].size()<10) u[i].insert(u[i].begin(),0); while (d[i].size()<10) d[i].push_back(0); } // rep(i,N) { cout << (isp[i] ? "+" : "-"); rep(j,10) cout << u[i][j]; cout << "."; rep(j,10) cout << d[i][j]; cout << endl; } ll us = 0, ds = 0; rep(i,N) { ll un = 0, dn = 0; rep(j,10) { un *= 10; un += u[i][j]; dn *= 10; dn += d[i][j]; } if (isp[i]) { us += un; ds += dn; } else { us -= un; ds -= dn; } } // cout << us << " " << ds << endl; ll dig = pow(10,10); if (ds>=0) { if (us+ds/dig>=0) { cout << us + ds/dig << "."; cout << setfill('0') << right << setw(9) << ds%dig; cout << endl; } else { cout << "-" << -1*(us+(ds+dig-1)/dig) << "."; cout << setfill('0') << right << setw(9) << dig-ds%dig; cout << endl; } } else { if (us+ds/dig>0) { cout << us + ds/dig - 1 << "."; cout << setfill('0') << right << setw(9) << dig+ds%dig; cout << endl; } else { cout << "-" << -1*(us+ds/dig) << "."; cout << setfill('0') << right << setw(9) << -1*ds%dig; cout << endl; } } return 0; }