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