ans = 0 x = int(input()) if x==2: print(999999) else: for i in range(10**4,x-1,-1): for j in range(2,10**8): a = pow(j,i) if a>10**15: break ans += 1000000/a print(int(ans))