#include <bits/stdc++.h> 
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main()
{
	int n;
	cin >> n;

	ll am = 0;
	double ae = 0;
	int ac = 0;
	rep(i, n)
	{
		ll x;
		cin >> x;
		x = abs(x);
		am += x;
		ae += x * x;
		ac = max(ac, (int)x);
	}
	ae = sqrt(ae);
	
	cout << setprecision(9) << fixed;
	cout << am << endl;
	cout << ae << endl;
	cout << ac << endl;
	return 0;
}
/* include c++ libraries */
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include <map>
#include <queue>
#include <set>

/* include c-lang libraries */
#include <climits>
#include <cmath>

/* include my libraries */
//#include <show_vec.hh>

using namespace std;

#define LINE DEBUG{ printf("LINE : %d\n", __LINE__); }
#define DEBUG if(false)

using ll = long long;
template<class T> using vec = vector<T>;

template<class T>void sort(vector<T> &v){
  sort(v.begin(), v.end());
  return;
}
template<class T>void rsort(vector<T> &v){
  sort(v.begin(), v.end(), std::greater<int>());
  return;
}


const int MOD = 1000000007;

ll Manhattan_Distance(vec<int> v){
  ll D = 0;
  for(int i = 0; i < v.size(); i++){
    D += abs(v[i]);
  }
  return D;
}

double Euclidean_Distance(vec<int> v){
  ll D = 0;
  for(int i = 0; i < v.size(); i++){
    D += (ll)v[i] * (ll)v[i];
  }
  return sqrt(D);
}

int Chebyshev_Distance(vec<int> v){
  int D = 0;
  for(int i = 0; i < v.size(); i++){
    if(D < abs(v[i])){
      D = abs(v[i]);;
    }
  }
  return D;
}

int main(int argc, char* argv[]){
  int N;
  cin >> N;
  vec<int> x(N);
  for(int i = 0; i < N; i++){
    cin >> x[i];
  }

  cout << Manhattan_Distance(x) << endl;
  printf("%.10lf\n", Euclidean_Distance(x));
  cout << Chebyshev_Distance(x) << endl;

  return 0;
}
