#include <bits/stdc++.h>
#define int long long
#define iostream() ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
using namespace std;
const int maxn = 1e6+7;
const int MAXN = maxn / 2;
int n,a[maxn],b[maxn],sum;
double ave;
signed main()
{
iostream();
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> a[i];
b[i] = a[i];
sum += a[i];
}
sort(a,a + n);
sum -= a[n - 1];
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if (a[i] == b[j])
{
b[j] = i + 1;
break;
}
}
}
ave = sum / n;
printf("%.2lf",ave);
return 0;
}