import Control.Monad

readIntLine :: IO ([Int])
readIntLine = do
    x <- getLine
    return $ map (read :: String -> Int) $ words x

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

canBeRem n k
    | mod (n - k) k == 0 = div (n - k) k
    | otherwise          = 0

allCands x n
    | x * x >= n = []
    | otherwise  = x:(allCands (x+1) n)

solve n = sum $ map (canBeRem n) $ allCands 1 n
