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

int main(){
  long long n,x,mnh=0,che=0;
  double uqu=0;
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>x;
    mnh+=abs(x);
    uqu+=x*x;
    che=max(abs(che),abs(x));
  }
  cout<<fixed<<setprecision(15);
  cout<<mnh<<endl;
  cout<<sqrt(uqu)<<endl;
  cout<<che<<endl;
}
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 

using namespace __gnu_pbds;
using namespace std;

// MACROS

using ll = long long;
template <class T>
using V = vector<T>;
template <class T>
using VV = V<V<T>>;

#define pii pair<int,int>
#define pll pair<ll,ll>

#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, a, b) for (int i = a; i < b; i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
#define per2(i, a, b) for (int i = a; i >= b; i--)
#define FORE(i, l) for (auto i : l)

#define pb push_back
#define pob pop_back
#define emp emplace
#define fi first
#define se second

#define all(n) n.begin(), n.end()
#define sz(x) ((int)(x).size())

// FUNCTIONS

template< typename T >
inline T gcd(T a, T b) { if (b) return gcd(b, a % b); return a; }

template< typename T >
inline T ext_gcd(T a, T b, T & x, T & y) { if (a == 0) { x = 0; y = 1; return b; } T x1, y1; T g = ext_gcd(b % a, a, x1, y1); x = y1 - (b / a) * x1; y = x1; return g; }

void file_input(string file) { freopen((file+".in").c_str(), "r", stdin); freopen((file+".out").c_str(), "w", stdout); }


const int MOD = 1e9 + 7;
const int MAX = 1e6;

int T, N, K;




int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);	
    cout << setprecision(15);
    cin >> N;
    V<ll> nums(N);
    rep(i, N) cin >> nums[i];
    ll man = 0;
    ll euc = 0;
    ll che = 0;
    rep(i, N)
    {
        man += abs(nums[i]);
        euc += abs(nums[i]) * abs(nums[i]);
        che = max(che, abs(nums[i]));
    }
    cout << man << "\n" << sqrt(euc) << "\n" << che << '\n';
}

