#include <bits/stdc++.h>
using namespace std;
#define rep(i,n)for(int i=0; i < (n);i++)
#define _GLIBCXX_DEBUG
typedef long long ll;



int main(){
    int n;
    cin >> n;
    vector<int>x(n);
    ll man = 0;
    ll euc = 0;
    int a = 0;
    rep(i,n){
        cin >> x[i];
        x[i] = abs(x[i]);
        man += x[i];
        euc += ll(x[i])*x[i];
        a = max(a,x[i]);
    }
    cout << man << endl;
    cout << setprecision(20) << sqrt(euc) <<endl;
    cout << a << endl;

  }

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

int main(){
  ios::sync_with_stdio(0); cin.tie(0);
  long long n, m=0; cin >> n; double e=0;
  vector<long long> x(n), c(n);
  for(long long i=0;i<n;i++) cin >> x[i];
  for(long long i=0;i<n;i++) m += abs(x[i]);
  for(long long i=0;i<n;i++) e += pow(abs(x[i]), 2);
  for(long long i=0;i<n;i++) c.push_back(abs(x[i]));
  sort(c.begin(), c.end());
  cout << setprecision(15) << endl;
  cout << m << endl;
  cout << sqrt(e) << endl;
  cout << c[c.size()-1] << endl;
  return 0; 
} 
