#include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <string>
#include <queue>
#include <algorithm>
#include <map>
#include <cmath>
#include <numeric>
#include <list>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <tuple>
#include <deque>
#include <complex>
#include <bitset>

using namespace std;

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;

typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<long long, long long> pll;
typedef vector<pll> vpll;

typedef long double ld;
typedef vector<ld> vld;

typedef vector<bool> vb;

#define rep(i, n) for (ll i = 0; i < (n); i++)
#define reps(i, n) for (ll i = 1; i <= (n); i++)
#define rrep(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define rreps(i, n) for (ll i = (n); i >= 1; i--)
#define all(v) (v).begin(), (v).end()

template <class T> void chmin(T& a, T b) { a = min(a, b);}
template <class T> void chmax(T& a, T b) { a = max(a, b);}

constexpr int INF = 1 << 30;
constexpr ll INFL = 1LL << 60;
constexpr ll MOD = 1000000007;
constexpr ld EPS = 1e-12;
ld PI = acos(-1.0);

void solve() {
    vll a(4);
    rep(i, 4) cin >> a[i];
    ll ans = 1000;
    rep(i, 4) chmin(ans, a[i]);
    cout << ans << endl;
    return;
}

int main() {
    std::cin.tie(nullptr);
    std::ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    solve();
}
#include<bits/stdc++.h>
using namespace std;
#define endl "\n";
typedef long long ll;
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	ll n,s=0,ma=0;
	cin>>n;
	double a[n],sum=0;
	for(int i=0;i<n;i++){
		cin>>a[i];
		ll k=abs(a[i]);
		ma=max(ma,k);
		s+=abs(a[i]);
		sum+=a[i]*a[i];
	}
	printf("%lld\n",s);
	printf("%0.16f\n",sqrt(sum));
	printf("%lld\n",ma);
}
