def f(n): t = [0] * 8192 for i in range(1, 8192 + 1): x = i ** n if x > 1000000000: 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] * 1024 for i in range(x, 1024 + 1): t[i - 1] = f(i) - 1 x = 1 while x < 1024: for i in range(0, 1024, x * 2): t[i] += t[i + x] x *= 2 print(int(t[0] * (10 ** 6)))