{-# LANGUAGE BangPatterns #-}
import Data.List
import Data.Maybe
import Data.Function (fix)
import Data.Array (Array, array, (!))
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BS8

modular :: Integer
modular = 1000000007
 
getInts :: IO [Int]
getInts = (map parseInt . BS8.words) <$> BS.getLine 
    where parseInt = fst . fromJust . BS8.readInt

getIntegers :: IO [Integer]
getIntegers = (map parseInteger . BS8.words) <$> BS.getLine 
    where parseInteger = fst . fromJust . BS8.readInteger

solve :: Int -> Int
solve n = go 1 n
    where go k n
            | n <= 0 = 0
            | otherwise = 1 + go (k+1) (n-k)

main :: IO ()
main = do
    [n] <- getInts
    print (solve n)