#include<bits/stdc++.h>  
using namespace std;  
  
#define fast ios::sync_with_stdio(false);cin.tie(NULL)  
#define fi first  
#define se second  
#define all(v) (v).begin(),(v).end()  
#define pb push_back  
#define eb emplace_back
#define em emplace
#define mp make_pair
#define pre(a) cout<<fixed; cout.precision(a);
  
typedef long long ll;  
typedef pair<int,int> pii;  
typedef pair<ll,ll> pll;  
const ll INF = 1e18;  
const int inf = 1e9;

int n;
ll a, c;
long double b;

int main() {
	fast;
	pre(15)

	cin >> n;

	for(int i=0; i<n; i++) {
		ll x;
		cin >> x;

		a += abs(x);
		b += x * x;
		c = max(c, abs(x));
	}

	cout << a << "\n" << sqrt(b) << "\n" << c;
}
#include<cstdio>
#include<iostream>
#include<cctype>
#include<cstring>
#include<cmath>
#include<string>
#include<algorithm>
#include<queue>
#include<stack>
using namespace std;

int main() {
    int n;
    long long ans[3] = {};
    cin >> n;
    int x[n] = {};
    for (int i = 0; i < n; i++) {
        cin >> x[i];
        if (x[i] < 0) {
            x[i] = -x[i];
        }
        ans[0] += x[i];
        ans[1] += ((long long)x[i])*x[i];
        if (x[i] > ans[2]) {
            ans[2] = x[i];
        }
    }
    cout << ans[0] << endl;
    printf("%.10f\n", sqrt(ans[1]));
    cout << ans[2] << endl;
}