#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
#include <set>
#include <limits.h>
#include <math.h>



int main(){
   long long n;
   cin>>n;
   long long a=0;
   for(long long i=0;i<n;i++){
    long long s;
    cin>>s;
    if(s>10){
        s=s-10;
        a+=s;
    }
   }
   cout<<a<<endl;
    return 0;
}

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

using ll = long long;
using ld = long double;
using vi = vector<int>;
using vll = vector<ll>;
using P = pair<int, int>;

constexpr int INF = 1e9;
constexpr ll INFLL = 1e18;
constexpr int MOD = 1e9 + 7;
const ld PI = acosl(-1);

#define rep(i,n) for(int i=0; i<(n); ++i)
#define all(n) n.begin(),n.end()

int main(){
    ios::sync_with_stdio(false); cin.tie(nullptr);
    cout << fixed << setprecision(15);
    int n; cin >> n;
    vector<ll> x(n);
    rep (i, n) cin >> x[i];

    ll tmp = 0;

    rep (i, n) tmp += abs(x[i]);
    cout << tmp << endl;

    tmp = 0;
    rep (i, n) tmp += x[i]*x[i];
    cout << sqrtf64x(tmp) << endl;

    tmp = 0;
    rep (i, n) tmp = max(tmp, abs(x[i]));
    cout << tmp << endl;
    return 0;
}
