#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
using namespace std; using ll = long long;
using ull = unsigned long long; using P = pair<int, int>;
const int INF = 1e9; const int MOD = 1000000007;
const int dx[] = {-1,0,1,0}; const int dy[] = {0,-1,0,1};
//const int dx[] = {-1,-1,-1, 0, 0, 1, 1, 1}; const int dy[] = {-1, 0, 1,-1, 1,-1, 0, 1};
#define PI 3.14159265358979323846264338327950L //setprecision(15)

int main() {
	int n; cin >> n;
	double a1 = 0.0, a2 = 0.0, a3 = 0.0;
	ll m = 0, s1 = 0, s2 = 0;
	rep(i, n) {
		ll temp; cin >> temp;
		temp = max(temp, -temp);
		m = max(temp, m);
		s1 += temp;
		s2 += temp * temp;
	}
	a1 = s1;
	a2 = sqrt(s2);
	a3 = m;
	cout << setprecision(15) << a1 << endl;
	cout << setprecision(15) << a2 << endl;
	cout << setprecision(15) << a3 << endl;
}
#pragma GCC optimize "trapv"
#include<iostream>
#include <bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define ull unsigned long long
#define ui unsigned int
#define vi vector<int>
#define vll vector<ll>
#define pb push_back
#define ld long double
#define mp make_pair
#define pii pair<int,int>
#define mod 1000000007
#define rep(i,n) for(int i=0;i<n;i++)
#define repp(i,a,n) for(int i=a;i<n;i++)
#define all(v) v.begin(),v.end()
#define input(arr,n) for(ll i1=0;i1<n;i1++ )cin>>arr[i1]
vector<string> split(const string& s, char c) {
    vector<string> v; stringstream ss(s); string x;
    while (getline(ss, x, c)) v.push_back(x); return move(v);
}
template<typename T, typename... Args>
inline string arrStr(T arr, int n) {
    stringstream s; s << "[";
    for(int i = 0; i < n - 1; i++) s << arr[i] << ",";
    s << arr[n - 1] << "]";
    return s.str();
}
#define EVARS(args...) {__evars_begin(__LINE__); __evars(split(#args, ',').begin(), args);}
inline void __evars_begin(int line) { cerr << "#" << line << ": "; }
template<typename T> inline void __evars_out_var(vector<T> val) { cerr << arrStr(val, val.size()); }
template<typename T> inline void __evars_out_var(T* val) { cerr << arrStr(val, 10); }
template<typename T> inline void __evars_out_var(T val) { cerr << val; }
inline void __evars(vector<string>::iterator it) { cerr << endl; }
template<typename T, typename... Args>
inline void __evars(vector<string>::iterator it, T a, Args... args) {
    cerr << it->substr((*it)[0] == ' ', it->length()) << "=";
    __evars_out_var(a);
    cerr << "; ";
    __evars(++it, args...);
}
template<typename T_vector>
void output_vector(const T_vector &v, bool add_one = false, int start = -1, int end = -1) {
    if (start < 0) start = 0;
    if (end < 0) end = int(v.size());
 
    for (int i = start; i < end; i++)
        cout << v[i] + (add_one ? 1 : 0) << (i < end - 1 ? ' ' : '\n');
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    fio;
    clock_t clk = clock();
    int t = 1;
    // cin >> t;
    while(t--)
    {
        ll n;
        cin >> n;
        ll p = 2;
        ll curr = 2;
        ll x = 1, cnt = 0;
        // while(1)
        // {
        //     x = 1;
        //     if(pow(2, p) > n)
        //     break;
        //    while(x <= n)
        //    {
        //        x = (ll)pow(curr, p);
        //         curr++;
        //         cnt++;
        //         // cout << x << " ";
        //    }
        //    cnt--;
        // //    cout << endl;
        //    curr = 2;
        // p++;
        // }
        set<ll> s;
        for(ll i = 2; i <= 40; i++)
        {
            for(ll j = 2; (ll)pow(j, i) <= n; j++)
            {
                s.insert((ll)pow(j, i));
                cnt++;
            }
        }
        cout << n - (ll)s.size() << endl;
    }
    cerr << '\n'<<"Time (in s): " << double(clock() - clk) * 1.0 / CLOCKS_PER_SEC << '\n';    
}