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

ll n,x,man=0,che=0;
double eu=0;

int main(){
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>x;
    man+=abs(x);
    eu+=abs(x*x);
    che=max(che,abs(x));
  }
  eu=sqrt(eu);
  printf("%ld",man);
  cout<<endl;
  printf("%.15lf",eu);
  cout<<endl;
  printf("%ld",che);
}

#include<bits/stdc++.h>
#define ll long long int
const ll MOD = 1e9+7;
const ll inf = 1e18+5;
using namespace std;
#define debug() for(ll l=0;l<50;l++){}
#define fast cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0);
ll bs(ll arr[], ll l, ll r, ll x){
	ll mid=0;
    if (r >= l){
		if (arr[mid] == x) return mid; 
        if (arr[mid] > x) return bs(arr, l, mid - 1, x); 
        return bs(arr, mid + 1, r, x); 
    }
    return -1;
}
ll power(ll x,ll y,ll p){
	ll res = 1;
	x = x % p;
	if(x == 0) return 0;
	while (y > 0){
		if (y & 1) res = (res*x) % p;
		y = y>>1;
		x = (x*x) % p;
		}
	return res;
}
const int max1=500001;
pair<int,int>st[4*max1];
int arr[max1],arr1[max1];
void buildtree(int si,int ss,int se){
	if(ss==se){
        st[si].first=arr1[ss];
        st[si].second=arr1[ss];
		return;
	}
	int mid=ss+(se-ss)/2;
	buildtree(2*si,ss,mid);
	buildtree(2*si+1,mid+1,se);
	if(arr1[mid]>arr1[mid+1]) st[si].first=st[2*si].first+st[2*si+1].first;
    else st[si].second=st[2*si].second+st[2*si+1].second;
	
}
int query(int si,int ss,int se,int qs,int qe){
	if(qs>se || qe<ss) //completely outside
		return inf;
	if(ss>=qs && se<=qe)
		return st[si].first;
	int mid=ss+(se-ss)/2;
	int l=query(2*si,ss,mid,qs,qe);
	int r=query(2*si+1,mid+1,se,qs,qe);
	return min(l,r);
}
int geteven(int si,int ss,int se,int qs,int qe){
	if(ss>qe || se<qs) //completely outside
		return 0;
	if(ss>=qs && se<=qe)
		return st[si].second;
	int mid=ss+(se-ss)/2;
	int l=geteven(2*si,ss,mid,qs,qe);
	int r=geteven(2*si+1,mid+1,se,qs,qe);
	return l+r;
}
int getodd(int si,int ss,int se,int qs,int qe){
	if(qs>se || qe<ss) //completely outside
		return 0;
	if(ss>=qs && se<=qe)
		return st[si].first;
	int mid=ss+(se-ss)/2;
	int l=getodd(2*si,ss,mid,qs,qe);
	int r=getodd(2*si+1,mid+1,se,qs,qe);
	return l+r;
}

void update(int si,int ss,int se,int qi,int newval){
	if(ss==se){
        if(arr[ss]%2==1) st[si]={0,1};
        else st[si]={1,0};
		arr[ss]=newval;
		return;
	}
	int mid=ss+(se-ss)/2;
	if(qi<=mid) update(2*si,ss,mid,qi,newval);
	else update(2*si+1,mid+1,se,qi,newval);
	st[si].first=st[2*si].first+st[2*si+1].first;
    st[si].second=st[2*si].second+st[2*si+1].second;
}
ll bin_exp(ll x, ll n){	// binary exponention
	ll res = 1;
	while(n){
		if(n&1)
			res = (res*x)%MOD;
		n /= 2;
		x = (x*x)%MOD; 
	}

	return res;
}
ll fermi(ll a, ll b){	// inverse mod
	return (a%MOD*(bin_exp(b, MOD-2)%MOD))%MOD;
}
ll nCr(ll n, ll r){	// calc nCr
	ll ans = 1;
	ll k = min(r, n-r);
	for(ll i=0;i<k;i++){
		ans = (ans%MOD *(n-i)%MOD)%MOD;	
		ans = fermi(ans, i+1);
	}

	return ans%MOD;
}
bool isPrime(ll n){
	ll flag=1;
	for (ll i = 2; i <= sqrt(n); i++) { 
        if (n % i == 0) { 
            flag = 0; 
            break; 
        } 
    } 
    if(n<=1) 
    flag=0; 
    else if(n==2) 
    flag=1;  
  
    if (flag == 1) return true;
    else return false;
}
void solve(){
	ll n;
	cin>>n;
	ll a[n];
	for(ll i=0;i<n;i++) cin>>a[i];
	ll a1=0,a2=0,a3=0;
	for(ll i=0;i<n;i++){
		a1+=abs(a[i]);
		a2+=abs(a[i]*a[i]);
		a3=max(a3,abs(a[i]));
	}
	printf("%lld\n",a1);
	printf("%.15lf\n",sqrt(a2));
	printf("%lld\n",a3);
}
int main(){
	fast;
	ll t=1;
	//cin>>t;
	while(t--)
		solve();
	return 0;
}
