#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<cmath>
#define rg register
template<typename T>void read(T &x){
	x=0;rg int fh=1;
	rg char ch=getchar();
	while(ch<'0' || ch>'9'){
		if(ch=='-') fh=-1;
		ch=getchar();
	}
	while(ch>='0' && ch<='9'){
		x=(x<<1)+(x<<3)+(ch^48);
		ch=getchar();
	}
	x*=fh;
}
const int maxn=1e6+5;
int n;
double f[maxn];
int main(){
	read(n);
	rg double tmp;
	for(rg int i=n-1;i>=1;i--){
		tmp=1.0-1.0*i/n;
		f[i]=(f[i+1]*tmp+1.0)/tmp;
	}
	printf("%.10f\n",f[1]);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define int long long
const int M = 1e9 + 7;

void solve() {
        int ar[] = {0, 6, 5, 4, 3, 2, 1};
        int a, b, c;
        cin >> a >> b >> c;
        cout << ar[a] + ar[b] + ar[c];
}

int32_t main() {
        ios_base::sync_with_stdio(false);
        cin.tie(0); cout.tie(0);
        cout << fixed << setprecision(12);

        int t = 1;
        //cin >> t;
        while (t--) {
                solve();
        }

        return 0;
}
