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

#define fo(i, n) for(int i=0; i<n; i++)
#define Fo(i, k, n) for(int i=k; i<n; i++)
#define endl "\n"
#define ll long long
#define vi vector<int>

void A() {
	int a, b, c;
	cin >> a >> b >> c;
	cout << (a - b + c);
}

void B() {
	int n;
	cin >> n;
	long long m = 0, e = 0, c = 0, temp;
	fo(i, n) {
		cin >> temp;
		m += abs(temp);
		e += temp * temp;
		c = max(c, abs(temp));
	}
	cout << m << endl << sqrt(e) << endl << c << endl;
}

int main() {
#ifndef ONLINE_JUDGE
	freopen("input1.txt", "r", stdin);
	freopen("output1.txt", "w", stdout);
#endif
	ios::sync_with_stdio(0);
	cin.tie(0);

	// int t;
	// cin >> t;
	cout << setprecision(12);
	B();

	return 0;
}

// memset(arr, value, size);
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm> 
#include <vector>
#include <iomanip>
using namespace std;



int main(){
  int N;
  cin >> N;
  vector<long> A(N);
  long   msum = 0;
   double  usum = 0;
  long   csum = 0;
  for(int i=0; i < N; i++){
    cin >> A[i];
    msum += abs(A[i]);
    usum += A[i]*A[i];
    csum = max(csum,abs(A[i]));
  }
  usum = sqrt(usum);
    cout << msum << endl;
    cout << fixed << setprecision(20) << usum << endl;
    cout << csum << endl;
}