#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define set_zero(a) memset(a,0,sizeof(a));
#define ll long long int
#define PI 2 * acos(0.0)
#define MAX 1000000000000000000
#define in(a) scanf("%d",&a);
#define out(a) printf("%d",a);
#define INF 1000000 
#define M 1000000007
#define pi 3.14159265 
using namespace std; 
int main(){ 
   fast_io
   ll n;
   cin>>n;
   ll a[n];
   for(ll i = 0;i<n;i++) cin>>a[i];
   long double ans = 0.0;
   for(ll i = 0;i<(n-1);i++){
      long double y = (long double) a[i];
      for(ll j = i+1;j<n;j++){
         long double r = (long double) a[j];
         long double sum = (y+r)/2.0;
         for(ll k = 0;k<n;k++){
            if(a[k] != a[i] && a[k] != a[j]){
               long double b = (long double) a[k];
               sum = (sum+b)/2.0;
            }
         }
         ans = max(ans,sum);
      }
   }
   cout<<fixed<<setprecision(15)<<ans<<endl;
   return 0;
} 