main = do
  x <- readLn :: IO Int
  print $ step 1 (abs x)

step :: Int -> Int -> Int
step i rest
  | rest - i == 0 = 1 
  | (rest-i) < (i+1) = 1 + step (i+1) rest
  | otherwise = 1 + step (i+1) (rest-i)