#include <stdio.h>
double HighScore;
double LowScore;
double SumScore;
double AverageScore;
void calcscore(int n);
int main()
{
int n;
scanf("%d",&n);
calcscore(n);
printf("%g %g %g %g\n",HighScore,LowScore,SumScore,AverageScore);
return 0;
}
void calcscore(int n)
{
int i;
double s;
HighScore=-1;
LowScore=1000;
SumScore=0;
for (i=0;i<n;i++)
{
scanf("%lf", &s);
if(s>HighScore)
HighScore=s;
if(s<LowScore)
LowScore=s;
SumScore+=s;
}
AverageScore=SumScore/n;
return;
}