#include<bits/stdc++.h>
using namespace std;
         
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define int long long
#define rep(i,a,b)    for(int i=a;i<b;i++)
#define repn(i,a,b)   for(int i=a;i>=b;i--)
#define F first
#define S second
#define pii pair<int,int>
#define vi vector<int>
#define vii vector<pii>
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define mod 1000000007  
const int N = 100001; 

int fexp(int a, int b,int m){int ans = 1;while(b){if(b&1)ans=(ans*a)%m; b/=2;a=(a*a)%m;}return ans;}
int inverse(int a, int p){return fexp(a, p-2,p);} 

// int fac[2000001];

// int nCrModPFermat(int n, int r,int p) { 
//     if (r==0) return 1; 
//     return (((fac[n]*((((inverse(fac[r],p)%p)*inverse(fac[n-r],p))%p))))%p); 
// }


void solve(){
    int n;cin>>n;int mx=0;
    vi a(n);rep(i,0,n){cin>>a[i];mx=max(mx,abs(a[i]));}
    int man=0;
    rep(i,0,n)man+=abs(a[i]);
    double eucl=0.0;
    rep(i,0,n)eucl+=(a[i]*a[i]);
    eucl=sqrt(eucl);
    cout<<man<<endl;
    cout<<fixed<<setprecision(10)<<eucl;
    cout<<endl<<mx;


}
         
signed main(){
        IOS;    
       

        int t=1;
        // cin>>t;
        // fac[0] = 1; 
        // for (int i=1 ; i<=100001; i++) fac[i] = fac[i-1]*i%mod; 
        rep(i,0,t){
            // cout<<"Case #"<<i+1<<": ";
            solve();
            cout<<"\n";
        }
    //    return 0;
}
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;
	vector<long long> a;
	long long mx=0;
	for (int i=0; i<n; i++) {
		long long x;
		cin >> x;
		a.push_back(x);
		mx=max(mx,abs(x));
	}
	long long sum=0;
	for (int i=0; i<n; i++) {
		sum+=abs(a[i]);
	}
	cout << sum << endl;
	sum=0;
	for (int i=0; i<n; i++) {
		sum+=pow(abs(a[i]),2);
	}
	printf("%.14f\n", sqrt(sum));
	cout << mx << endl;
}