import Control.Monad
main = readLn >>= print . solve

solve :: Int -> Int
solve n = length . show . head $ [n `div` a | a <- [m, (m - 1)..1], n `mod` a == 0]
    where
        m = truncate . sqrt $ fromIntegral n
