#include <iostream>
#include <cmath>
using namespace std;
long long int b[100005];
double c[100005];
int main()
{
	int n,a,ma=-100008;
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
	{
		scanf("%d",&a);
		b[i]=b[i-1]+abs(a);//1
		c[i]=c[i-1]+pow(a,2);//2
		ma=max(ma,abs(a));
	}
	printf("%lld\n",b[n]);
	printf("%.15lf\n",sqrt(c[n]));
	printf("%d",ma);
	return 0;
}
#include<iostream>
#include<bits/stdc++.h>
using namespace std;

int main()
{
    cout<<fixed<<setprecision(15);

    int n;
    cin>>n;
    vector<int>x(n);
    for(int i=0; i<n; i++)
        cin>>x[i];
    long ans1=0;
    for(int i=0; i<n; i++)
        ans1+=abs(x[i]);
    cout<<ans1<<endl;
    double ans2=0;
    for(int i=0; i<n; i++)
        ans2+=((double)abs(x[i])*(double)abs(x[i]));
    cout<<sqrt(ans2)<<endl;
    int ans3=0;
    for(int i=0; i<n; i++)
        ans3 = max(ans3, abs(x[i]));
    cout<<ans3<<endl;
}