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

fav n s = div n s == mod n s

canBeRem n k
    | mod n k == 0 && fav n s = s
    | otherwise               = 0
         where s = div (n - k) k

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

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