#pragma GCC optimize("O3")
#include<bits/stdc++.h> 
using namespace std;
using ll=long long;
using P=pair<ll,ll>;
template<class T> using V=vector<T>; 
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
const ll inf=(1e18);
//const ll mod=998244353;
const ll mod=1000000007;
ll GCD(ll a,ll b) {return b ? GCD(b,a%b):a;}
ll LCM(ll c,ll d){return c/GCD(c,d)*d;}
struct __INIT{__INIT(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);}} __init;
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
template<class T>void debag(const vector<T> &a){cerr<<"debag :";for(auto v:a)cerr<<v<<" ";cerr<<"\n";}
template<class T>void print(const vector<T> &a){for(auto v:a)cout<<v<<" ";cout<<"\n";}
int main(){
    ll n;
    cin>>n;
    V<ll> a(n),sum(n+1,0);
    ll v=0;
    for(int i=0;i<n;i++){
         cin>>a[i];
         a[i]*=2;
         v+=a[i];
    }
    sort(all(a));
    for(int i=0;i<n;i++){
          sum[i+1]+=sum[i]+a[i];
    }
    ll ans=inf;
    for(int i=0;i<n;i++){
          ll id=lower_bound(all(a),a[i])-a.begin();
          ll res=(sum[n]-sum[id])-(n-id)*a[i]+n*(a[i]/2);
          chmin(ans,res);
    }
    cout<<double(ans)/double(2*n)<<"\n";
}
#include<bits/stdc++.h>
using namespace std;
#define sz(x) (int)(x).size() 
#define int long long int
#define loop(i,a,b) for(int i=a;i<b;i++)
#define scan(arr,n) for (int i = 0; i < n; ++i) cin >> arr[i]
#define vi vector<int>
#define si set<int>
#define pii pair <int, int>
#define sii set<pii>
#define vii vector<pii>
#define mii map <int, int>
#define pb push_back
#define ff first
#define ss second
#define all(aa) aa.begin(), aa.end()
#define rall(a) a.rbegin() , a.rend()
#define read(a,b) int a,b;  cin>>a>>b
#define readt(a,b,c) int a,b,c; cin>>a>>b>>c
#define readf(a,b,c,d) int a,b,c,d; cin>>a>>b>>c>>d;
#define print(v) for(auto x:v) cout<<x<<" ";cout<<endl
#define printPair(res) for(pair<int,int>& p:res) cout<<p.first<<" "<<p.second<<endl;
#define faster ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)

const int N=2E6+5;
multiset<int> mn[N];


void solve(int test)
{
  int n;cin>>n;
  cout<<fixed<<setprecision(6);
  double val=0.0;
  for(int i=1;i<n;i++)
  {
    val+= (n*1.0/i *1.0);
  }
  cout<<val;
}

int32_t main()
{
      #ifndef ONLINE_JUDGE
          freopen("input.txt", "r", stdin);
          freopen("output.txt", "w", stdout);
      #endif
      faster;
      //fact(mod);
      int t=1;
     // cin>>t;
      for(int test=1;test<=t;test++)
      {
          solve(test);
      }
}