fn main() { let mut buf = String::new(); let mut input = { use std::io::Read; std::io::stdin().read_to_string(&mut buf).unwrap(); buf.split_whitespace() }; let t: usize = input.next().unwrap().parse().unwrap(); let n: Vec = (0..t) .map(|_| input.next().unwrap().parse().unwrap()) .collect(); for i in 0..t { let x = (n[i] as f64).sqrt().floor() as u64; let ans = if x.pow(2) <= n[i] { x } else { x - 1 }; println!("{}", ans); } }