import Data.List
import Data.Maybe

main = do
    x <- read <$> getLine :: IO Int
    let ns = (zip [1..]) $ scanl (+) 1 [2..] :: [(Int, Int)]
    print . fst . fromJust $ find (\p -> snd p >= x) ns
    