#include <bits/stdc++.h>
using namespace std;
#define int long long 
const int MOD = 1e9 + 7;
const int N = 3e5 + 10;
int32_t main() {
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   int n;
   cin >> n;
   cout << setprecision(12)  << fixed ;
   vector<int>v(n);
   for (int i = 0;i < n;i++){
      cin >> v[i];
   }
   int m = 0;
   long double a = 0;
   int rr = 0;
   for(auto s : v){
      m += abs(s);
      a += s*s;
      rr = max(rr,abs(s));
   }
   a = sqrt(a);
   cout << m << "\n" << a << "\n" << rr;

   return 0;
}

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

int main() {
    int i,j,k,n;
    pair <int,int> a[400010];
    int b[400010];
    cin>>n;
    for(i=0;i<2*n;i++) {
        cin>>k;
        a[i]=make_pair(k,i);
    }
    sort(a,a+2*n);
    for(i=0;i<n;i++) {
        b[a[i].second]=-1;
    }
    for(i=n;i<2*n;i++) {
        b[a[i].second]=1;
    }
    i=0;
    while(i<2*n) {
        k=b[i];
        j=b[i];
        cout<<'(';
        while(i<2*n&&k!=0) {
            i++;
            if (b[i]*j==1) {
                cout<<'(';
            }
            else {
                cout<<')';
            }
            k+=b[i];
        }
        i++;
    }
    return 0;
}