program main
  implicit none
  
  integer :: n,i,m
  
  read(*,*)n
  
  do i = n,1,-1
    m = int(sqrt(real(i)))
    if (m*m == i) then
      write(*,*)i
      stop
    end if
  end do
end program main