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

int main() {
	// your code goes here
	ll n;
	cin>>n;
	ll a[n];
	ll aa=0,cc=0,bb=0;
    cout<<setprecision(20);
	for(int i=0;i<n;i++)
	{
	    cin>>a[i];
	    a[i]=abs(a[i]);
	    aa+=a[i];
	    cc=max(a[i],cc);
	    bb+=(a[i]*a[i]);
	}
	//bb=sqrt(bb);
	cout<<aa<<endl;
    cout<<sqrt(bb)<<endl;
	//cout<<bb<<endl;
	cout<<cc<<endl;
	return 0;
}

#include <bits/stdc++.h>
#include <numeric>
using namespace std ;
#define ll long long int
#define ull unsigned long long int
#define s(a) scanf("%lld",&a)
#define S(a) scanf("%ull",&a)
#define For(i,n) for(i=0;i<n;i++)
#define FOR(i,n) for(i=1;i<=n;i++)
#define pie acos(-1.0)
//#define cin std::cin
//#define cout std::cout
ll test, flag,R ,gcd_,temp,temp1,G,B,a,b, n,i,p,q,sum,S,l,r, m,Y,z,XD,j,j_1,k,k1,res ,min_ ,flag1,max_,XD1,count_,s_size ;
char ch ,ch_1 ;
string s,s3;
//char s[100010] ;
char c2[520][520];
ll pl,x,y,mi,c,d, u,v ,ans,ans1;
char garbage,garbage1 ;
struct vox{
   ll a;
   ll index ;
   ll b ;
} ;
bool comp(vox x, vox y) {
   return x.a < y.a ;
} 
bool com(vox x, vox y) {
   return x.index < y.index ;
} 
ll lcm(ull a, ull b)
{
    return (a / __gcd(a, b)) * b;
}
int main()
{
          //ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
          
            cin >> n ;
            ll arr[100100] ;
            sum = 0 ;
            double answer = 0 ;
            max_ = 0 ;
            for(i=0; i<n;i++) {cin >> arr[i] ;
              sum +=abs(arr[i]) ;
              answer = answer + (double) pow(abs(arr[i]),2);
              if(abs(arr[i])>max_) max_ = abs(arr[i]) ;
            }
            sort(arr,arr+n) ;
            //max_ = arr[n-1] ;
            printf("%lld\n",sum);
            
            printf("%.15lf\n", sqrt(answer));
            printf("%lld\n",max_);


            return 0;
           }