#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
#define F first
#define S second
#define endl '\n'
#define all(x) (x).begin(),(x).end()
#define sz(x) (int)(x).size()
#ifdef dremix
    #define p(x) cerr<<#x<<" = "<<x<<endl;
    #define p2(x,y) cerr<<#x<<" , "<<#y<<" = "<<x<<" , "<<y<<endl;
    #define pp(x) cerr<<#x<<" = ("<<x.F<<" , "<<x.S<<")"<<endl;
    #define pv(x) cerr<<#x<<" = {";for(auto u : x)cerr<<u<<", ";cerr<<"}"<<endl;
    #define ppv(x) cerr<<#x<<" = {";for(auto u : x)cerr<<u.F<<"-"<<u.S<<", ";cerr<<"}"<<endl;
#else
    #define p(x)
    #define p2(x,y)
    #define pp(x)
    #define pv(x)
    #define ppv(x)
#endif
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int maxp = 22;
const ld EPS = 1e-18;
const ll INF = 1e18;
const int MOD = 1e9+7;
const int N = 2e5+1;
void yesno(bool a){if(a){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}}
ll power(ll x, ll n, ll m){if(n==0)return 1;ll u=power(x,n/2,m);u=(u*u)%m;if(n%2)u=(u*x)%m;return u;}
/// * int overflow, array bounds
/// * special cases (n=1?)
/// * do something - write observations down
/// * change approaches


int main (){
fastio;

int n;
cin>>n;

int i;

ld arr[n];

for(i=0;i<n;i++)
    cin>>arr[i];

ld ans[3]={};

for(i=0;i<n;i++)
    ans[0] += abs(arr[i]);

ld temp = 0;

for(i=0;i<n;i++){
    temp += arr[i]*arr[i];
}

ans[1] = sqrt(temp);

ans[2] = -INF;
for(i=0;i<n;i++)
    ans[2] = max(ans[2],abs(arr[i]));

cout<<fixed<<setprecision(10);
for(i=0;i<3;i++)cout<<ans[i]<<endl;



}

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

int main() {
  int x;
  cin >> x;
  long long m = 0;
  long long y = 0;
  int t = 0;
  for(int i = 0; i < x; i++){
    int a;
    cin >> a;
    if(i == 0) t = abs(a);
    m += abs(a);
    y += pow(a,2);
    t = max(t,abs(a));
  }
  double yu = sqrt(y);
  cout << m  << endl;
  cout << fixed << setprecision(16) << yu << endl;
  cout << t  << endl;
}
