#include<bits/stdc++.h>
using namespace std;


#define mp             make_pair
#define pb             push_back
#define int 	       long long
#define rep(i,a,b)     for(int i=a;i<b;i++)
#define Rep(i,a,b)     for(int i=a;i<=b;i++)
#define rept(it,v)     for(auto it=v.begin();it!=v.end();it++)
#define all(x)         (x).begin(),(x).end()
#define pii            pair<int,int>
#define mii            map<int,int>
#define vi             vector <int>
#define vpi            vector <pair<int,int>>
#define F              first
#define S              second
#define fill(a,b)      memset(a,b,sizeof(a))
const int mod = 1e9 + 7;

int binpow(int a, int b, int m) {
	int res = 1;
	while (b > 0) {
		if (b % 2)
			res = ((res % m) * (a % m)) % m;
		a = ((a % m) * (a % m)) % m;
		b /= 2;
	}
	return res;
}

const int N = 1e5 + 5;

void solve() {
	int n, max_value = 0, sum = 0;
	double sum2 = 0;
	cin >> n;
	vi v(n);
	rep(i, 0, n) {
		cin >> v[i];
		if (v[i] < 0)
			v[i] *= -1;
	}

	rep(i, 0, n) {
		sum += v[i];
		if (max_value < v[i])
			max_value = v[i];

		sum2 += pow(v[i], 2);
	}

	cout << sum << endl;
	cout << setprecision(20) << sqrt(sum2) << endl;
	cout << max_value;
}

int32_t main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	int t = 1;
	// cin>>t;
	while (t--)
	{
		solve();
	}

	return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> pi;
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);
#define f first
#define s second

const int maxn = 100010;
int x[maxn];

int32_t main() {
	int n; cin >> n;
	for (int i =0;i<n;i++) cin >> x[i];
	
	int manh = 0;
	for (int i =0;i<n;i++) manh += abs(x[i]);

	long double eucli = 0;
	for (int i =0;i<n;i++) eucli += abs(x[i]) * abs(x[i]);
	eucli = sqrt((double) eucli);
	
	int cheb = 0;
	for (int i =0;i<n;i++) cheb = max(cheb, abs(x[i]));
	
	cout << setprecision(10) << manh << "\n" << eucli << "\n" << cheb;
	
}



