def f(n): for i in range(2, 8192 + 1): x = i ** n if x > 1000000000: break t.append(1 / x) x = int(input()) t = [] for i in range(x, 64): f(i) t.extend([0] * (64 * 8192 - len(t))) t.sort() x = 1 while x < 64 * 8192: for i in range(0, 64 * 8192, x * 2): t[i] += t[i + x] x *= 2 print(int(t[0] * (10 ** 6)))