import sys def I(): return int(sys.stdin.readline().rstrip()) x = I() if x == 2: print(10**6) exit() ans = 0 for i in range(2,10000): if pow(i,x-1) <= 10**12: ans += (1/(i**(x-1)))/(i-1) else: break print(int(ans*10**6))