#include<bits/stdc++.h>
using namespace std;
int main()
{
int i,b,n,d=0;
cin>>n;
double z;
int a[n]={0};
int c[1001]={0};
for(int i=0;i<n;i++)
{
cin>>a[i];
d=d+a[i];
c[a[i]]++;
}
cout<<fixed<<setprecision(2)<<d*1.0/n<<" ";
int max=0;
for(int i=0;i<1001;i++)
{
if(c[i]>c[max])
{
max=i;
}
}
cout<<max<<" ";
int temp;
for(int i=1;i<n;i++)
{
for(int j=0;j<=n-i-1;j++)
{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
if(n%2!=0)
{
z=1.0*a[n/2];
}
else
{
z=1.0*(a[n/2]+a[n/2-1])/2;
}
cout<<fixed<<setprecision(1)<<z;
return 0;
}
/**************************************************************
Problem: 1179
User: mariooo
Language: C++
Result: Accepted
Time:7 ms
Memory:2072 kb
****************************************************************/