/*
                                                                                                       
                                                                                                       
                                                                                                       
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░▒░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▒▓▓▓▓▒▒░▒▒░░▒░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒░░▒▒▒▒▒░▒▓▓██▓▓▓▓▓▓▓▓▓▓▒░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▓▓▓▓█████▓▓███▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒░░▒░▒▒▓▓▓████████▓▓▓▓▓▓▓▒░▒░░░░░▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░░░▒▒▒▒▒▒▒▒▒▒▓▒▒▒▒▒▒▓▓█▓▓░░░░░░▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░░▒▒▒▒▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▒░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓░░▒▒▒▒▒▒░░░▒▒▒▒▒░░▒▒▒▒▒▒▒░░░░░░░░░░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░▒▒▓▓▓▒▓▓▓▒▒▓▓▓▒▒▒▒▓▒░░░░░▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒▒▒▒▒░░░░░░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▒░▒▒▒▒▒▒▓▒▒▒▒▒▒▒▒▒▓▒░░░░░░░▒▒▒▒▒▒▒▒▒▒░░░░░▒▒▒▒▒▒▒▒░░░░░░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒░▒▒▒▒▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒░░░░▒▒▒▒░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒░▒▒▒▒▓▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░▒▒▒▒▒▒▒▒░░░▒▒▒░░░░░░░▒▒▒▒▒▒   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▓▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒░░▒▒▒▒░░░░░░░▒▒▒▒   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▓▓▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒░░░░░▒▒░░░░░▒▒▒░░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░▒░░░░░▒▒▒░░   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒░▒▓▓▓▓▒▒▒▒▒▒▒▒░▓▓▒░░░░░░░▒▒▒▒▒░▒▒▒▒▒▒░░░░░░░░░░░░░░░▒▒▒▒   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒░░░▒▒▒▓▓▓▓▒▒▒▒▒▒▒░▒▓███▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▒▒░░░░░░▒░░░░░░░░▒▒▒   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒░▒▒▓▒▒▓▓▓▒▒▒▒▒░░░▓██████▓▓▓▓▓▓▒▒▒░▒▒▒▒▒▒▒░░░░░░▒░░░░░░░░▒▒▒   
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▓▓▓▒▒▒░▒▒▒▒▒▒▓▓▓▒▒░░░▒████████████████▓▓▓▓▒▒▒▒░░░░░░▒░░░░░░░▒▒▒▒   
    ░░░░░░░░░░░░░░░░░░▒▒▒░░░░░▒▒▒▓▓██▓█▓▒░▒▒▒▓▓▓▒▒▓▒▒░░░░▒▓██████████████████████▓▒░░░░░▒▒░░░░░░▒▒▒▒▒   
    ░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▓▓▓▓███████▓▒░▒▒▒▓▓▓▒▒▒░░░░░▒██████████████████████████▒░░░░▒▒░░░░░▒▒▒░░░   
    ░░▒░░░░░░░░░░░░░▒▒▒▒▒▒▓█████████████▓██▒▒▓▓▓▒▒▓▓▒░░▒███████████████████████████▓░▒▒▒▒▒░░░░▒▒▒▒░░░   
    ░▒░▒░░░░░░░░░░░░░░▒▒▒▒▓████████████████▓▓▓▓▓▒▒▓▒▒▒▒▒████████████████████████████▒░░░▒▒▒▒░▒▒▒░░░░░   
    ▒▒▒▒▒▒▒░░░░░░░░░░░░░▒▒▓████████████████▓▓▓▓▒▒▓▒▒▒▒▒██████████████████████████████▒░░░░▒▒▒▒▒▒▒▒▒▒░   
    ▒▒▒▒▒▒▒░░░░░░░░░░░░▒▒▒▓██████████████████▒▒▒▓▒▒▒▒▒▓██████████████████████████████▒░░░░░▒▒▒▒▒▒▒▒▒▒   
    ▒▒▒▒▒▒▒▒░░░░░░░▒▒▒▒▒▒▒▓████████████████▓▓▒▒▒▒▒▒▒▒▓███████████████████████████████▓░░░░▒▒▒▒▒▒▒░░░░   
    ▒▒░░▒▒▒▒▒░░░░░░▒▒▒▒▒▒▒▓████████████████▓▒▒▒▒▒▒▒▒▓█████████████████████████████████▓░░░▒▒▒▒▒▒▒▒░░░   
    ▒▒░░░▒▒▒▒▒░░░░░░▒▒▒▒▒▒████████████████▓▒▒▒▒▒▒▒▓▓███████████████████████████████████▒░░░▒▒▒░▒▒▒░░░   
    ▒░░░░░▒░░░░░░░░░░░▒▒▒▓█████████████████▒▒▒▒▒▓████████████████████████████████████████▓▓▒▒░░░▒░░░░   
    ▒░░░░░▒░░░░░░░░░░▒▒▒▒▓█████████████████▓▓▓▓▓████████████▒▒▒▒▒▒▒▒▓▓██████████████████████▓░░░░░░░░   
    ░░░░░▒▒▒░░░░░░░░░▒░▒▒▓████████████████████▓▓█▓▓▓████████▒▓▓▓▓▓▓▒▒▒▓████████████████████████▓░░░░░   
    ░░░▒▒▒▒░░░░░░░░▒▒▒▒▒▒▒████████████████████▓▓▓▓▒▓████████▓▓▓▓▓▓▓▓▒▒▒▒▓████████████████████████▒▒▒░   
    ░░▒▒▒▒▒▒░░░░░░░▒▒▒▒▒▒▒█████████████████▓▓▒▓▓▒▒▒▓█████████▓▓▓▓▒▒▒▒▒▒▒▒████████████████████████▓░▒▒   
    ▒▒▒▒▒░░░░▒▒░░░░░▒▒▒▒▒▒█████████████████▓▒▒▓▓▒▓▓███████████▓▓▓▒▒▒▒▒▒▒▒▓███████████████████████▓░▒▒   
    ▒▒░░░░░░░░░░░░░░░▒▒▒▒▒▓████████████████▓▓▒▓▓▓▓▓████████████████▓▓▓▒▒▒▓███████████████████████▓░▒▒   
    ▒▒░░░░░░░░░░░░░░▒▒▒▒▒▓█████████████████▓▓▓▓▓██████████████████████▓▓▓▓▓███████████████████████▒▒▒   
    ░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▓▓▓▓▓███▓▓▒▒▒▒▓▓▓▓██▓▓████████████████████████████████▒▓▒████████████████▒▒▒   
    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓███▓▒▒▒▓▓▓▓▓▓▓█████▓██▓███████████████████████████████████████████████▒▒▒▒   
    ▒░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▓██▓▓▓▓▒▓▓▓▓▓▓▓▓███▓▓▓▓▓████████████████████████████████████████████▓▒▒▒▒▒▒   
    ▒▒▒▒░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▓█▓███▓▓▓▓▓▓▓▓▓▓███▓▓▓▓▓█████████████████████████████▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒   
    ▒▒▒░▒░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓█████▓▓▓▓▓▓▓▓████▓▓▓▓▓██████████████████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒   
    ▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██▓▓▓▓▓▓█████▓▓▓▓███████████████████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒   
    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓█████████████▓█████████████████████████████████▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒   
    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓████████▓█████████████████████████████████▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒   
    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓█████▓▓▓▓▓██████████████████████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒   
    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓█████▓▓▓▓▓▓█████████████████████████████████▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒   
    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓█████▓▓▓▓▓▓██████████████████████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒   
                                                                                                       
                                                                                                       

*/

#include <bits/stdc++.h>
#define ll long long
#define dou double
#define fi first
#define se second
#define pa pair<ll, ll>
#define pa2 pair<ll, pa>
using namespace std;
const ll mod = 1e9 + 7; 
const ll maxN = 1e5 + 6;
const ll inf = LLONG_MAX;
const ll dx[] = {0, 0, -1, 1};
const ll dy[] = {-1, 1, 0, 0};
ll n;
dou res[10];
int main()
{
    // freopen(".inp", "r", stdin);
    // freopen(".out", "w", stdout);
    ios_base::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    cin >> n;
    for (int i = 1; i <= n; i++) 
    {
        dou a;
        cin >> a;
        res[1] += a;
        if (a < 0) res[2] += a;
        if (a > 0) res[3] += a;
        if (i % 2 == 0) res[4] += a;
        if (i % 2 == 1) res[5] += a;
    }
    for (int i = 1; i <= 5; i++) cout << fixed << setprecision(2) << res[i] << " ";
}

