// author : lynmisakura
// TIMESTAMP: 2020-10-17, 20:00:51

#include<bits/stdc++.h>
#include<iomanip>
using namespace std; 
#define REP(i,n) for(int i = 0;i < n;i++)
#define RNG(i,s,n) for(int i = s;i < n;i++)
#define _RNG(i,s,e) for(int i=s;i>=e;i--)
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define dup(x,y) (x + y - 1) / (y)
#define all(x) (x).begin(),(x).end()
#define lb(x,key) lower_bound(all(x) , (key))
#define ub(x,key) upper_bound(all(x) , (key))

template<class T> bool chmax(T& a,T b){ if(a < b){ a = b; return true; }else return false; }
template<class T> bool chmin(T& a,T b){ if(a > b){ a = b; return true; }else return false; }

using ll = long long;
using ld = long double;
using vi = vector<int>;
using vl = vector<ll>;
using pi = pair<int,int>;
using pl = pair<ll,ll>;
using vpi = vector<pi>;
using vpl = vector<pl>;

#define debug(arr) cout << #arr << " = " << arr << '\n'
#define debug2(a,b) cout<<"["<<#a<<","<<#b<<"] = "<<"["<<a<<","<<b<<"]\n"
#define debug3(a,b,c) cout<<"["<<#a<<","<<#b<<","<<#c<<"] = "<<"["<<a<<","<<b<<","<<c<<"]\n"
template<class T> ostream &operator << (ostream& out, const vector<T>& arr) {
  cout << "{"; for (int i = 0; i < arr.size(); i++)cout << (!i ? "" : ", ") << arr[i]; cout << "}";
  return out;
}
template<class T> ostream &operator << (ostream& out, const vector<vector<T> >& arr) {
  cout << "{\n"; for (auto& vec : arr)cout << "  " << vec << ",\n"; cout << "}";
  return out;
}
template<class S,class T> ostream &operator << (ostream& out, const pair<S,T>& p){
  cout << "{" << p.first << "," << p.second << "}" << '\n';
  return out;
}
template<class T> istream &operator >> (istream& in, vector<T>& arr) {
  for (auto& i : arr)cin >> i; return in;
}
template<class S,class T> istream &operator >> (istream& in,pair<S,T>& p){
  cin >> p.first >> p.second; return in;
}

#define F first
#define S second
/////////////////////////////////////////////////////////////////////////

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

  int n;
  vector<long long> a;
  ld m = 0,u = 0,c = 0;

  cin >> n;
  a.resize(n);
  REP(i,n){
    cin >> a[i];
  }
  
  REP(i,n){
    m += abs(a[i]);
  }
  REP(i,n){
    u += a[i] * a[i];
  }
  u = sqrt(u);
  c = 0.0;
  REP(i,n){
    if(abs(a[i]) > c) c = abs(a[i]);
  }
  cout << m << '\n';
  cout << u << '\n';
  cout << c << '\n';
  return 0;
}

#include <bits/stdc++.h>
#define LL long long
using namespace std;
int n,C;
LL A,B;
int main()
{
	scanf("%d",&n);
	for (int i=1,x;i<=n;i++)
	{
		scanf("%d",&x);
		A+=abs(x);
		B+=(LL)x*x;
		C=max(C,abs(x));
	}
	printf("%lld\n%.12f\n%d\n",A,sqrt(B),C);
	return 0;
}
