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