#include<bits/stdc++.h>
using namespace std;
int main()
{
	cout << fixed << setprecision(15);

	int n;
	cin >> n;
	vector<int>x(n);
	for(int i=0;i<n;i++)cin >> x[i];

	long ans1=0;
	for(int i=0;i<n;i++)ans1+=abs(x[i]);
	cout << ans1 << endl;

	long ans2=0;
	for(int i=0;i<n;i++)ans2+=abs(x[i])*(long)abs(x[i]);
	cout << sqrt(ans2) << endl;

	int ans3=0;
	for(int i=0;i<n;i++)ans3=max(ans3,abs(x[i]));
	cout << ans3 << endl;
}


#include<bits/stdc++.h>
using namespace std;
#define ll        long long int
#define ld        long double
#define mod             1000000007
#define inf             1e18
#define endl      "\n"
#define pb        push_back
#define vi              vector<ll>
#define vs        vector<string>
#define pii             pair<ll,ll>
#define ump       unordered_map
#define mp        make_pair
#define pq_max          priority_queue<ll>
#define pq_min          priority_queue<ll,vi,greater<ll> >
#define all(n)      n.begin(),n.end()
#define ff        first
#define ss        second
#define mid(l,r)        (l+(r-l)/2)
#define bitc(n)     __builtin_popcount(n)
#define loop(i,a,b)   for(long long i=(a);i<=(b);i++)
#define loopr(i,a,b)  for(long  long i=(a);i>=(b);i--)
const ll N = 1e5 + 5 ;
ll prime[N];
vector<long long>ans; 
void sieve()
{
  for ( int i = 0 ; i < N; i++)
    prime[i] = i;

  prime[1] = 1 ;

  for (long long i = 2 ; i < N ; i++  ) // always use long long here !!
  {
    if (prime[i] == i)
    { 
    	ans.push_back(i);
      for (long long j = i*i ; j < N; j += i)
      {   
        prime[j] = i ;
      }
    }
  }

}

long long powr(int x, int y)  
{  
    if (y == 0)  return 1;  
    long long res=powr(x,y/2); 
    if (y % 2)  return (res*res*x ); 
    return (res*res);  
 } 

void file_i_o()
{
    ios_base::sync_with_stdio(0); 
    cin.tie(0); 
    cout.tie(0);
  #ifndef ONLINE_JUDGE
      freopen("input.txt", "r", stdin);
      freopen("output.txt", "w", stdout);
  #endif
}   

void solve() 
{    ll n ;
	 cin>>n ; 
	 ll a[n]; 
	 ll sum =0 ;
	 loop(i,0,n-1)
	 {
	 	cin>>a[i]; 
	 		if(a[i]>10) 
	 		{
	 			sum+= (a[i]-10); 
	 		}
 	 } 
 	 cout<<sum; 
	
	return ;
} 

int main() {
  clock_t begin = clock();
  file_i_o();
  sieve();
  int t=1;
 	//cin>>t;
    while(t--) 
    {
      solve();
    }

  #ifndef ONLINE_JUDGE 
     clock_t end = clock();
     cout<<"\n\nExecuted In: "<<double(end - begin) / CLOCKS_PER_SEC*1000<<" ms";
  #endif 
  return 0;
} 