#include <bits/stdc++.h>
#define rep(i, l, r) for (int i = (l); i < (r); i++)
#define max(p, q) ((p) > (q) ? (p) : (q))
#define min(p, q) ((p) < (q) ? (p) : (q))
#define ALL(a) (a).begin(), (a).end()
#define INF ((1LL << 62) - (1LL << 31))
#define MOD 1000000007
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
int main(void) {
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    double n;
    cin >> n;
    double ans = 0;
    rep(i, 1, n) { ans += n / (double)(n - i); }
    cout << fixed << setprecision(12) << ans << endl;

    return 0;
}
#include <iostream>
#include <vector>
#include <algorithm>
 
using namespace std;
 
typedef long long ll;
 
int main() {
  int n;
  cin >> n;
 
  vector<ll> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
 
  sort(a.begin(), a.end());
 
  ll prefix_sum = 0, ans = 0;
  for (int i = 0; i < n; ++i) {
    ans += a[i] * i - prefix_sum;
    prefix_sum += a[i];
  }
 
  cout << ans << endl;
 
  return 0;
}