fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: u64 = n.trim().parse().unwrap(); let mut answer = 0; for x in 1..n { if ((n * n - x * x) as f64).sqrt().fract() < f64::EPSILON { answer += 1; } } println!("{answer}"); }