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