#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main() {
	int n;
	cin >> n;
	vector<int> x(n);
	rep(i,n) cin >> x[i];
	ll ansM=0;
	double ans=0;
	int ansC=0;
	ll ansU=0;
	rep(i,n) {
		ansM += abs(x[i]);
		ll x2 = ll(x[i])*ll(x[i]);
		ansU += x2;
		ansC = max(ansC,abs(x[i]));
	}
	ans +=ansU;
	ans = sqrt(ans);
	cout << ansM << endl;
	printf("%.15lf\n", ans);
	cout << ansC << endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int n,p,ans;
bool b[200010];
inline int read()
{
	int num=0,flag=1;
	char c=getchar();
	for (;c<'0'||c>'9';c=getchar())
	if (c=='-') flag=-1;
	for (;c>='0'&&c<='9';c=getchar())
	num=(num<<3)+(num<<1)+c-48;
	return num*flag;
}
int main()
{
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	memset(b,0,sizeof(b));
	ans=0;
	n=read();
	for (int i=1;i<=n;++i)
	{
		p=read();
		b[p]=true;
		if (ans==p)
		for (int j=p+1;j<=200000;++j)
		if (!b[j])
		{
			ans=j;
			break;
		}
		printf("%d\n",ans);
	}
	fclose(stdin);
	fclose(stdout);
	return 0;
}
