module Main where

import           Control.Monad
import           Debug.Trace
import qualified Data.Vector.Unboxed           as VU
import           Data.List
import qualified Data.ByteString               as BS
import qualified Data.ByteString.Char8         as BSC8
import           Data.Char
import           Data.Maybe
import qualified Data.Text                     as T

tuplify2 (x : y : _) = (x, y)
tuplify2 _           = undefined

getVUIntFromInputLineAtBSC8 :: IO (VU.Vector Int)
getVUIntFromInputLineAtBSC8 =
    VU.unfoldr (BSC8.readInt . BSC8.dropWhile isSpace) <$> BSC8.getLine
getVUIntListFromInputLineAtBSC8 =
    VU.unfoldr (BSC8.readInt . BSC8.dropWhile isSpace) <$> BSC8.getLine

readInt = fst . fromJust . BSC8.readInt
readIntTuple = tuplify2 . map readInt . BSC8.words
readIntList = map readInt . BSC8.words

getInt = readInt <$> BSC8.getLine
getIntList = readIntList <$> BSC8.getLine
getIntNList n = map readIntList <$> replicateM (fromIntegral n) BSC8.getLine
getIntMatrix = map readIntList . BSC8.lines <$> BS.getContents
getIntTuple = readIntTuple <$> BSC8.getLine
getIntNTuples n = map readIntTuple <$> replicateM (fromIntegral n) BSC8.getLine
getIntTuples = map readIntTuple . BSC8.lines <$> BSC8.getContents

main :: IO ()
main = do

    aN <- getInt

    print $ getK aN


getK n= length (nub((getBaiBaiK n) ++ (getkakekakeK n)))+2

getBaiBaiK n = 
        let ret = getBaiBaiK' n [2..] 
        in if ret==0
            then [] 
            else [ret]

getBaiBaiK' n (x:xs) = 
    if (mod n x == 0) 
        then 
            if getBaiBaiK'' n x 
                then x 
                else 0 
        else getBaiBaiK' n xs 

getBaiBaiK'' n x = 
    if x*x > n 
        then False
        else 
            if mod n x == 0 
                then getBaiBaiK'' (div n x) x
                else False 

getkakekakeK :: Int-> [Int]
getkakekakeK n = getkakekakeK' (n-1) [2..] []

getkakekakeK' :: Int->[Int]->[Int]->[Int]
getkakekakeK' n (x:xs) ys = 
    --trace ("n:"++(show n)++"x:"++(show x)++"ys:"++(show ys))$
    if (x * 2) > n 
        then ys
        else
            if mod n x == 0 
                then getkakekakeK' n xs (ys++[x])  
                else getkakekakeK' n xs ys 
