#include #include using namespace std; typedef long long ll; const ll B = 1e10; int main(){ int N; cin >> N; ll inte = 0, frac = 0; for(int i=0;i> s; int p = (int)s.find("."); if(p != -1){ is = s.substr(0, p); fs = s.substr(p + 1); } else { is = s; } fs = fs + string(10 - fs.size(), '0'); ll in = atoll(is.c_str()); ll fr = atoll(fs.c_str()); if(is[0] == '-')fr = -fr; inte += in; frac += fr; } while(frac < 0){ --inte; frac += B; } while(frac >= B){ ++inte; frac -= B; } if(inte < 0 && frac > 0){ ++inte; frac = B - frac; } printf("%lld.%010lld\n", inte, frac); return 0; }