main = do
    n <- read <$> getLine :: IO Int
    putans $ answer n

answer :: Int -> [Int]
answer n = let x = ceiling $ (*) 0.5 $ (+) (-1) $ sqrt $ fromIntegral $ 1 + 8 * n
               sumx = round $ (fromIntegral x)*(1+fromIntegral x)/2.0
           in filter ((/=) (sumx - n)) [1..x]

putans :: [Int] -> IO [()]
putans = sequence . map (putStrLn . show)
