program main
  implicit none
  integer(8) :: n, sni
  read(*, *) n
  sni = nint(n ** 0.5_8)
  if (sni ** 2 <= n) then
    write(*, "(i0)") sni ** 2
  else
    write(*, "(i0)") (sni - 1) ** 2
  end if
end program main
