import math N = int(input()) def zeta(x): return 1/x zeta_c = [0] * (10**6 + 1) for i in range(1,10**6 + 1): zeta_c[i] = zeta_c[i-1] + 1/i def zeta_cumsum(x): if x <= 10**6: return zeta_c[x] else: return math.log(x) + 0.5772156649 M = int(N ** 0.5) ans = 0 for i in range(1, M+1): ans += zeta_cumsum(N//i) * zeta(i) for j in range(1, M+1): ans += (zeta_cumsum(N//j) - zeta_cumsum(M))* zeta(j) print(ans)