/*
-----------------AUTHOR-----------------------
--------------Parth Mangal--------------------
----------------------------------------------
*/

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ull unsigned long long int
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

void gareeb(){
	int n;
	cin>>n;
	int arr[n],temp;
	for(int i=0;i<n;i++){
		cin>>temp;
		arr[i]=abs(temp);
	}
	ll m=0;
	for(int i=0;i<n;i++){
		m = m+ arr[i];
	}
	cout<<m<<endl;
	double e=0;
	for(int i=0;i<n;i++){
		e = e+ pow(arr[i],2);
	}
	cout<<fixed<<setprecision(15)<<sqrt(e)<<endl;
	sort(arr,arr+n);
	cout<<arr[n-1];
}

		
int main()
{
    fastio;
    int t=1;
    //cin>>t;
    while(t--)
    {
        gareeb();
    }
    return 0;
}

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

int main() {
  int N;
  cin >> N;
  int64_t a[N];
  for(int i=0; i<N; i++){
    cin >> a[i];
  }
  for (int i=0; i<N; i++){
    if (a[i]<0){
      a[i] = (-1) * a[i];
    }
  }
  int64_t M=0;
  for(int i=0; i<N; i++){
      M+=a[i];
  }
  int64_t x=0;
  double E;
  for(int i=0; i<N; i++){
      x+=a[i]*a[i];
  }
  E=sqrt(x);
  int64_t C=0;
  for(int i=0; i<N; i++){
      C=max(C,a[i]);
  }
  cout << M << endl;
  cout << fixed << setprecision(18) << E << endl;
  cout << C << endl;
}
