program ABC077B
    implicit none
    integer(8)::N
    integer(8)::i=1
    read(5,*)N

    do
        if(i**2>N)then
            exit
        end if
        i=i+1
    end do

    print'(i0)',(i-1)**2
end program ABC077B