def f(n): t = [0] * 16384 for i in range(2, 16384 + 1): x = i ** n t[i - 1] = 1 / x x = 1 while x < 16384: for i in range(0, 16384, x * 2): t[i] += t[i + x] x *= 2 return t[0] x = int(input()) t = [0] * 256 for i in range(x, 256 + 1): t[i - 1] = f(i) x = 1 while x < 256: for i in range(0, 256, x * 2): t[i] += t[i + x] x *= 2 print(int(t[0] * (10 ** 6)))