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