import sys input = lambda : sys.stdin.readline().rstrip() sys.setrecursionlimit(2*10**5+10) write = lambda x: sys.stdout.write(x+"\n") debug = lambda x: sys.stderr.write(x+"\n") writef = lambda x: print("{:.12f}".format(x)) ### ふるい def hurui(n): """n以下の素数のリストを返す """ not_prime = [0]*(n+1) for p in range(2,n+1): if not_prime[p]: continue for i in range(2*p, n+1, p): not_prime[i] = 1 # return not_prime return [i for i in range(2,n+1) if not not_prime[i]] n = int(input()) # ps = hurui(n) vals = [0]*(n+1) for i in range(1,n+1): if i*i>n: break vals[i*i] = i v = 0 for i in range(1,n+1): if vals[i]==0: vals[i] = v else: v = vals[i] xs = list(range(n+1)) not_prime = [0]*(n+1) for p in range(2,n+1): if p*p>n: break if not_prime[p]: continue for i in range(2*p, n+1, p): not_prime[i] = 1 pp = p*p for i in range(p*p, n+1, p*p): xs[i] //= pp ans = 0 for a in range(1,n+1): ans += vals[n//xs[a]] print(ans)