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.sort() while len(t) != 1: nt = [] for i in range(0, len(t) // 2 * 2, 2): nt.append(t[i] + t[i + 1]) if len(t) % 2 == 1: nt.append(t[-1]) nt.sort() t = nt print(int(t[0] * (10 ** 6)))