#include<bits/stdc++.h>
using namespace std;
int main()
{
 	long long int i,n,ed=0,md=0;
 	long double dd;
 	cin>>n;
 	long long int a[n];
 	for(i=0;i<n;i++){
 		cin>>a[i];
 		if(a[i]<0) a[i]=-a[i];
 		md+=a[i];
 		ed+=a[i]*a[i];
	 }
	sort(a,a+n);
	cout<<md<<endl;
	dd=sqrt(ed);
	cout<<fixed<<setprecision(15);
	cout<<dd<<endl;
	cout<<a[n-1]<<endl;
 	 return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
#define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()

ll sum(const vector<ll>& vec) {
    ll ans = 0;
    for (ll v: vec) ans += v;
    return ans;
}

void solve(long long N, std::vector<long long> x){
    vector<ll> absX(N);
    rep(i, N) absX.at(i) = abs(x.at(i));
    vector<ll> absXQ(N);
    rep(i, N) absXQ.at(i) = absX.at(i) * absX.at(i);

    cout << sum(absX) << endl;
    cout << fixed << setprecision(9) << sqrt(double(sum(absXQ))) << endl;
    cout << *max_element(all(absX)) << endl;
}

int main(){
    long long N;
    scanf("%lld",&N);
    std::vector<long long> x(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&x[i]);
    }
    solve(N, std::move(x));
    return 0;
}
