open Batteries
let () =
  let n = Scanf.scanf "%d " (fun a -> a) in

  let rec aux i n prev =
    let pow = i*i in
    if pow > n then prev else aux (i+1) n pow
  in
  Printf.printf "%d\n" @@
  aux 1 n max_int
