def f(n): t = [0] * 8192 for i in range(2, 8192 + 1): x = i ** n if x > 1000000000000: break t[i - 1] = 1 / x x = 1 while x < 8192: for i in range(0, 8192, x * 2): t[i] += t[i + x] x *= 2 return t[0] x = int(input()) t = [0] * 128 for i in range(x, 128 + 1): t[i - 1] = f(i) x = 1 while x < 128: for i in range(0, 128, x * 2): t[i] += t[i + x] x *= 2 print(int(t[0] * (10 ** 6)))