#define _USE_MATH_DEFINES
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <deque>
#include <queue>
#include <set>
#include <functional>
#include <cmath>
#include <set>
#include <map>
#include <limits>


//マクロ
#define REP(i,n) for(int i=0; i<(int)(n); ++i)
#define REPS(i,n) for(int i=1; i<=(int)(n); ++i)
#define RREP(i,n) for(int i=(int)(n)-1; i>=0; --i)
#define RREPS(i,n) for(int i=(int)(n); i>0; --i)
#define FOR(i,s,e) for(int i=(int)(s); i<(int)(e); ++i)
#define RFOR(i,s,e) for(int i=(int)(e)-1; i>=(int)(s); --i)
#define All(a) (a).begin(),(a).end()
#define RAll(a) (a).rbegin(),(a).rend()
#define dump(x)  cerr << #x << " = " << (x) << endl;

//定数
#define INF 1e9
#define INFL 1e18
#define MOD 998244353

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using namespace std;
using vi = vector<int>;
using vii = vector<vi>;
using vs = vector<string>;
using pii = pair<int, int>;
using Graph = vector<vector<int>>;

//とりあえず書いておく変数
int dx[4] = { 1,0,-1,0 };
int dy[4] = { 0,1,0,-1 };

//今回の変数
const ld eps = 1.0e-10; // 許容される誤差

//使用する関数
template<class T>bool chmax(T &a, const T &b) {
	if (a < b) { a = b; return 1; }
	return 0;
}
template<class T>bool chmin(T &a, const T &b) {
	if (a > b) { a = b; return 1; }
	return 0;
}

bool comp(pair<int,pair<int,int>> a, pair<int, pair<int, int>> b){
	return a.first <= b.first;
}

ld mysqrtl(ld x)
{
	ld a = sqrt((double)x); // 近似値
	do {
		a = (a + x / a) / 2.0L;
	} while (fabsl(x - a*a) > eps);
	return a;
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout << fixed << setprecision(15);

	int n;
	//*
	cin >> n;

	vector<int> x = vector<int>(n);
	REP(i, n) {
		cin >> x[i];
	}
	/*/
	n = 100000;
	vector<int> x = vector<int>(n, 100000);
	//*/

	ll mh = 0;
	REP(i, n) {
		mh += abs(x[i]);
	}
	cout << mh << endl;

	ld tmpEu = 0;
	REP(i, n) {
		tmpEu += x[i] * (ll)x[i];
	}
	cout << sqrt(tmpEu) << endl;


	int ch = 0;
	REP(i, n) {
		chmax(ch, abs(x[i]));
	}
	cout << ch << endl;
}
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <iomanip>
#include <limits>
using namespace std;

int main() {
  long long N; cin >> N;
  long long x[N];
  for (int i = 0; i < N; i++) cin >> x[i];
  
  long long ans1 = 0;
  for (int i = 0; i < N; i++) ans1 += abs(x[i]);
  double ans2 = 0;
  for (int i = 0; i < N; i++) ans2 += x[i] * x[i];
  ans2 = sqrt(ans2);
  long long ans3 = 0;
  for (int i = 0; i < N; i++) ans3 = max(ans3, abs(x[i]));
  
  cout << ans1 << endl;
  cout << fixed << setprecision(13) << ans2 << endl;
  cout << ans3 << endl;
}