solve :: Int -> Int
solve n = i
  where
    (i, v):_ = dropWhile (\(_, v) -> v < n) $ map (\x -> (x, ((x + 1) * x) `div` 2)) [1 .. ]

main :: IO ()
main = do
  n <- readLn :: IO Int
  print $ solve n
