import Control.Applicative

getInt :: IO Integer
getInt = (\a -> read a :: Integer) <$> getLine
getIntArray :: IO [Integer]
getIntArray = ((map (\a -> read a :: Integer)) . words) <$> getLine

conSqrt :: Integer -> Integer -> Integer -> Integer
conSqrt x n p
    | x < p * n = p
    | otherwise = conSqrt x n $ n * p
loop :: Integer -> Integer -> Integer
loop x n
    | x < n * n = 0
    | otherwise = maximum [(loop x $ n + 1), (conSqrt x n n)]

main = do
    x <- getInt
    print $ if x < 4 then 1 else loop x 2
