module Main where

import qualified Data.Vector as V
import           Data.List
import           Control.Applicative
import           Control.Monad

main :: IO ()
main = do
  n <- readLn
  print $ f n 0

f n x
  | x ^ 2 <= n = f n $ x + 1
  | otherwise = (x - 1) ^ 2
