def isqrt(n): x = n y = (x + 1) // 2 while y < x: x = y y = (x + n // x) // 2 return x def primes(n): is_prime = [True] * (n + 1) is_prime[0] = False is_prime[1] = False for i in range(2, int(n ** 0.5) + 1): if not is_prime[i]: continue for j in range(i * 2, n + 1, i): is_prime[j] = False return (i for i in range(n + 1) if is_prime[i]) def main(): N = int(input()) table = list(range(N + 1)) for p in primes(N): p2 = p ** 2 for x in range(p2, N + 1, p2): while not table[x] % p2: table[x] //= p2 ans = 0 for a in range(1, N + 1): ans += isqrt(N // table[a]) print(ans) main()