#include<bits/stdc++.h>
#define re register 
#define mod 998244353
#define eps (1e-10)
#define int long long
using namespace std;
#define N 100010
int n;
double f[N];
template <class T> inline void read(T &x)
{
	x=0;int g=1;char ss=getchar();
	for (;ss>'9'||ss<'0';ss=getchar()) if (ss=='-') g=-1;
	for (;ss<='9'&&ss>='0';ss=getchar()) x=(x<<1)+(x<<3)+(ss^48);	
	x*=g;
} 
signed main()
{
	read(n);
	f[1]=0;
	for(int i=2;i<=n;i++)
	{
		f[i]=f[i-1]*(n-i+1)/n+1;
		f[i]/=1-(i-1.0)/n;
	}
	printf("%.8lf",f[n]);
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;

int main(){
  int N;
  cin >> N;
  double sum = 0;
  for(int i = 1; i < N; i++){
    sum += double(1) / i;
  }
  cout << fixed << setprecision(7);
  cout << N * sum << endl;
}