import Data.Bool main :: IO () main = do n <- readLn :: IO Int let t = floor . sqrt . fromIntegral $ n x = bool t (t - 1) (t * t > n) print $ x + n `div` (x + 1)