-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU main = print . solve =<< readLn solve n = ans where t = filter f $ takeWhile g [1..] f x = mod n x == 0 g x = x * x <= n d = if last t ^ 2 == n then 1 else 0 p = length t ans = d + (p - d) * 2