#include using namespace std; #define all(v) v.begin(), v.end() #define ll long long #define rep(i, n) for (ll i = 0; i < n; ++i) #define rep_up(i, a, b) for (ll i = a; i < b; ++i) #define rep_down(i, a, b) for (ll i = a; i > b; --i) #define P pair #define Graph vector> #define fi first #define se second #define vvvvll vector>>> #define vvvll vector>> #define vvll vector> #define vll vector #define vvvvdo vector>>> #define vvvdo vector>> #define vvdo vector> #define vdo vector #define pqll priority_queue #define pqllg priority_queue, greater> constexpr ll INF = (1ll << 60); constexpr ll mod = 998244353; // constexpr ll mod = 67280421310721; // constexpr ll mod = 1000000007; constexpr double pi = 3.14159265358979323846; template inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } template void pt_vll(vector &v) { ll vs = v.size(); rep(i, vs) { cout << v[i]; if (i == vs - 1) cout << "\n"; else cout << " "; } } template void pt_vvll(vector> &v) { ll vs = v.size(); rep(i, vs) pt_vll(v[i]); } template void pt(T val) { cout << val << "\n"; } ll gcd(ll a, ll b) { if (a % b == 0) return b; return gcd(b, a % b); } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } ll modinv(ll a, ll m) { ll b = m, u = 1, v = 0; while (b) { ll t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } u %= m; if (u < 0) u += m; return u; } ll modpow(ll x, ll n) { ll ret = 1; while (n > 0) { if (n & 1) ret = ret * x % mod; // n の最下位bitが 1 ならば x^(2^i) をかける x = x * x % mod; n >>= 1; // n を1bit 左にずらす } return ret; } ll minv(ll a, ll m) { return modpow(a, m - 2); } string To_String(ll a) { string ret; while (a) { ret.push_back(a % 10 + '0'), a /= 10; } reverse(all(ret)); return ret; } pair double_to_long_long(string s, ll dig) { bool minus = false; if (s[0] == '-') { s = s.substr(1); minus = true; } ll Int = 0, Dic = 0; ll i; // 整数部分 for (i = 0; i < s.size() && s[i] != '.'; i++) { Int = Int * 10 + s[i] - '0'; } string a; if (minus) { a = "-"; a.append(To_String(Int)); } else a = To_String(Int); ll mul = 1; while (--dig) mul *= 10; // 小数部分 for (ll j = i + 1; j < s.size(); j++) { Dic += (s[j] - '0') * mul; mul /= 10; } string b = To_String(Dic); rep(i, b.size()) a.push_back(b[i]); if (minus) { Int *= -1, Dic *= -1; } return {{Int, Dic}, a}; } int main() { ll N; cin >> N; vector A(N); rep(i, N) cin >> A[i]; ll Int = 0, Dic = 0; rep(i, N) { pair a = double_to_long_long(A[i], 10); Int += a.fi.fi; Dic += a.fi.se; } Int += (Dic / 10000000000); Dic -= (Dic / 10000000000) * 10000000000; if (Dic < 0) { Dic += 10000000000; Int--; cout << Int << "." << Dic << "\n"; } string INT = To_String(Int), DIC = To_String(Dic); while (DIC.size() != 10) DIC.push_back('0'); cout << INT << "." << DIC << "\n"; return 0; }