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