import math gamma = .5772156649015328606065120 mx = 1000000 H_table = [0] * (mx + 1) def H(n): if n < 0: return 0.0 if n <= mx: return H_table[n] return math.log(n) + gamma for i in range(1, mx+1): H_table[i] = H_table[i-1] + 1 / i n = int(input()) ans = 0.0 i = n while i > 0: v = n // i j = n // (v + 1) ans += H(v) * (H(i) - H(j)) i = j print(ans)