x = int(input()) if x == 2: print(1000000) else: total = 0.0 k = 2 eps = 1e-20 # Adjust this if necessary while True: denom = (k ** (x - 1)) * (k - 1) if denom == float('inf'): break term = 1.0 / denom if term < eps: break total += term k += 1 result = total * 1e6 print(int(result))