main = do
  line <- getLine
  let 
    x = read $ head $ words line :: Int
    square x = x*x
    func i x 
      | square i <= x  = func (i+1) x
      | otherwise     = square (i-1)
    in
      putStrLn $ show $ func 1 x
