#include <iostream>
#include <cmath>
#include <iomanip>
typedef long long ll;
using namespace std;

int main() {
	int N, tmp;
	ll mand = 0, powsum = 0, chebid = 0;
	double eucd;
	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> tmp;
		mand += abs(tmp);
		powsum += pow(tmp, 2);
		if (chebid < abs(tmp)) {
			chebid = abs(tmp);
		}
	}
	eucd = sqrt(powsum);
	cout << mand << endl;
	cout << fixed << setprecision(10) <<eucd << endl;
	cout << chebid << endl;
	return 0;
}
	


#include <algorithm>
#include <cmath>
#include <vector>
#include <functional>
#include <cstdlib>
#include <map>
#include <set>
#include <iostream>
#include <string>
#include <ctype.h>
#include <climits>
#include <stack>
#include <queue>
#include <cassert>
#include <iomanip>
using namespace std;
typedef long long ll;
#define REP(i, n) for(ll i = 0; i < (ll)(n); ++i)
#define FOR(i, a, b) for(ll i=(a); i < (ll)(b); ++i)
template<class T> inline bool chmax(T& a, T b) { if(a < b){ a=b; return 1; } return 0;}
template<class T> inline bool chmin(T& a, T b) { if(a > b){ a=b; return 1; } return 0;}

int main(){
	int n;
	cin >> n;
	vector<int> x(n);
	REP(i,n) cin >> x[i];
	
	ll m=0;
	ll eu=0;
	ll che=0;
	REP(i,n){
		m += abs(x[i]);
		eu  += (ll)x[i]*x[i];
		chmax(che, (ll)abs(x[i]));
	}
	long double ans = sqrt(eu);
	printf("%Ld\n%.12Lf\n%Ld\n", m, ans, che);
	
	
	return 0;
}