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