import itertools from array import array 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 = array("B", itertools.repeat(1, n + 1)) is_prime[0] = 0 is_prime[1] = 0 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] = 0 return (i for i in range(n + 1) if is_prime[i]) N = int(input()) table = array("L", range(N + 1)) P = primes(N) for p in P: 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)