#include <bits/stdc++.h>
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <random>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define repp(i,n,m) for (int i = m; i < (n); ++i)
#define repl(i,n) for (long long i = 0; i < (n); ++i)
#define reppl(i,n,m) for (long long i = m; i < (n); ++i)
//#define int long long
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using PI = pair<pair<int,int>,int>;
using PL = pair<long long, long long>;
using Pxy = pair<double, double>;
using Tiib = tuple<int, int, bool>;
const int INF = 1001001007;
const long long mod = 1000000007LL;
const int MOD = 998244353;
const ll inf = 1e18;
template <typename AT>
void printvec(vector<AT> &ar){
    rep(i,ar.size()-1) cout << ar[i] << " ";
    cout << ar[ar.size()-1] << endl;
}
template <typename Q>
void printvvec(vector<vector<Q>> &ar){
    rep(i,ar.size()){
        rep(j,ar[0].size()-1) cout << ar[i][j] << " ";
        cout << ar[i][ar[0].size()-1] << endl;
    }
}
template <typename S>
bool range(S a, S b, S x){
    return (a <= x && x < b);
}

void yes(){
    cout << "Yes" << endl;
}

void no (){
    cout << "No" << endl;
}

ll cel (ll a, ll b){
    if (a % b == 0) return a / b;
    else return a / b + 1;
}

ll gcds(ll a, ll b){
    ll c = a % b;
    while (c != 0){
        a = b;
        b = c;
        c = a % b;
    }
    return b;
}

int main(){
    int n; cin >> n;
    ld a = 0.0;
    ld b = 0.0;
    ld c = 0.0;
    rep(i,n){
        ld k; cin >> k;
        a += abs(k);
        b += k * k;
        c = max(c,abs(k));
    }
    cout << setprecision(20);
    cout << a << endl;
    cout << sqrt(b) << endl;
    cout << c << endl;
}
#include <string>
#include <math.h>
#include <iostream>
#include <iomanip>
 
using namespace std;
 
int main()
{
  int n;
  cin >> n;
  long long a = 0;
  long long b = 0;
  long long c = 0;
  long long x;
  for (long i = 0; i < n; i++) {
    cin >> x;
    if (x < 0)
     x = x * (-1);
    a = a + x;
    b = b + x * x;
    if (c < x)
      c = x;
    
  }
  long double bb =sqrt(b);
  cout << a << '\n' << fixed << setprecision(15) << bb << '\n';
  cout << c << '\n';
}