#include<bits/stdc++.h>
#include<tuple>
typedef long long ll;
#define INF 99999999999999
#define mod 1000000007
#define eps 1e-9
using namespace std;
typedef pair<ll,ll>du;
ll n,x,c,y,l=0,r=0;
long double ans;
int main(){
    ios::sync_with_stdio(0);
    cin>>n;
    for(ll i=1;i<n;i++)
        ans+=(long double)n/(n-i);
    cout<<setprecision(9)<<fixed<<ans<<endl;
}
#include "bits/stdc++.h"
#define in std::cin
#define out std::cout
#define rep(i,N) for(LL i=0;i<N;++i)
typedef long long int LL;

int main()
{
	LL N;
	in >> N;

	LL ans = N;
	std::map<LL, LL>flag;
	for (LL a = 2; a * a <= N; ++a)
	{
		if (flag[a] == 1) continue;
		LL m = a * a;
		do
		{
			--ans;
			flag[m] = 1;
			m *= a;
		} while (m <= N);
	}

	out << ans << std::endl;
}
