module Main where

import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = do
    n <- readLn :: IO Int
    let as = takeWhile (<= n) $ fmap (^ 2) [1 ..]
    print $ maximum as