import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = do
    x <- readLn :: IO Int
    let a1 = zip [1.. ] (scanl1 (+) [1..])
    let a2 = dropWhile ((< x) . snd) a1
    let ans = fst $ head a2
    print ans