use std::io::*; fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let n: usize = itr.next().unwrap().parse().unwrap(); let m = (n as f64).sqrt() as usize; let mut is_prime: Vec = vec![true; m + 1]; let mut ps = Vec::new(); is_prime[0] = false; is_prime[1] = false; for i in 2..m + 1 { if is_prime[i] { ps.push(i); let mut j = i * 2; while j <= m { is_prime[j] = false; j += i; } } } let mut ans = 0usize; let mut val: Vec = (0..n + 1).collect(); for &p in ps.iter() { let p2 = p * p; for i in 1..n / p2 + 1 { while val[i * p2] % p2 == 0 { val[i * p2] /= p2; } } } for i in 1..n + 1 { // val[i] * x <= nの平方数xの数 ans += (n as f64 / val[i] as f64).sqrt() as usize; } println!("{}", ans); }