ans = 0 x = int(input()) for i in range(x,10**4+1): for j in range(2,10**5): a = pow(j,i) if a>10**12: break ans += 10**6/a print(int(ans))