#include <bits/stdc++.h>
 
//#include <atcoder/all>
#define For(i, a, b) for (int(i) = (int)(a); (i) < (int)(b); ++(i))
#define rFor(i, a, b) for (int(i) = (int)(a)-1; (i) >= (int)(b); --(i))
#define rep(i, n) For((i), 0, (n))
#define rrep(i, n) rFor((i), (n), 0)
#define fi first
#define se second
using namespace std;
typedef long long lint;
typedef unsigned long long ulint;
typedef pair<int, int> pii;
typedef pair<lint, lint> pll;
template <class T>
bool chmax(T &a, const T &b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
template <class T>
bool chmin(T &a, const T &b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T>
T div_floor(T a, T b) {
    if (b < 0) a *= -1, b *= -1;
    return a >= 0 ? a / b : (a + 1) / b - 1;
}
template <class T>
T div_ceil(T a, T b) {
    if (b < 0) a *= -1, b *= -1;
    return a > 0 ? (a - 1) / b + 1 : a / b;
}
 
constexpr lint mod = 1000000007;
constexpr lint INF = mod * mod;
constexpr int MAX = 200010;
 
int main() {
    int n;
    scanf("%d", &n);
    double x[n];
    rep(i, n) scanf("%lf", &x[i]);
    {
        double ans = 0;
        rep(i, n) ans += abs(x[i]);
        printf("%.10lf\n", ans);
    }
    {
        double ans = 0;
        rep(i, n) ans += x[i] * x[i];
        printf("%.10lf\n", sqrt(ans));
    }
    {
        double ans = 0;
        rep(i, n) chmax(ans, abs(x[i]));
        printf("%.10lf\n", ans);
    }
}
#include "bits/stdc++.h"
using namespace std;
using ll = long long;

int main() {
    int n;
    cin >> n;
    vector<ll> x(n);
    for (int i = 0; i < n; i++) {
        cin >> x[i];
    }
    ll d1, d2;
    ll d3;
    d1 = 0;
    d2 = 0;
    d3 = 0;
    for (int i = 0; i < n; i++) {
        d1 += abs(x[i]);
        d2 += x[i] * x[i];
        d3 = max(d3, abs(x[i]));
    }
    long double d4 = sqrt(d2);
    cout << d1 << endl;
    cout << setprecision(20) << d4 << endl;
    cout << (ll)d3 << endl;
    return 0;
}