#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define rt return 0
#define endln "\n"
#define all(v) v.begin(), v.end()
#define for1(i, a, b) for (long long int i = a; i < b; i++)
#define for2(i, a, b) for (long long int i = a; i > b; i--)
//  cout << fixed << setprecision(0) << pi <<" "<<npi<<endl;typedef long long int i;
typedef long long int lli;
typedef pair<lli, lli> pll;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    lli t;
    cin >> t;
    vector<lli> v;
    for1(i, 0, t)
    {
        lli a;
        cin >> a;
        v.pb(a);
    }
    long double a2 = 0;
    lli a3 = 0, a1 = 0;
    for1(i, 0, t)
    {
        a1 += abs(v[i]);
        if (abs(v[i]) > a3)
        {
            a3 = abs(v[i]);
        }
        a2 += (long double)(v[i] * v[i]);
    }
    long double a4 = sqrtl(a2);
    cout << a1 << endl;
    cout << fixed << setprecision(15) << a4 << endl;
    cout << a3 << endl;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); ++i)

int main() {
    int N; cin >> N;
    vector<long long> A(N);
    for(auto &e : A) cin >> e;

    long long m = 0;
    for(auto &e : A) m += abs(e);
    cout << m << '\n';

    double y = 0;
    for(auto &e : A) y += double(e) * e;
    y = sqrt(y);
    printf("%.15lf\n", y);

    long long c = 0;
    for(auto &e : A) c = max(c, abs(e));
    cout << c << '\n';
    return 0;
}
