module Main
  ( main
  )
where

import           Control.Applicative
import           Control.Monad
import           Data.List
import           Data.Array
import           Data.Char

main = do
  n <- (read :: String -> Int) <$> getLine
  let x = last . filter (\a -> n `mod` a == 0) . takeWhile (\a -> a * a <= n) $ [1..]
  print . countDigit $ n `div `x

countDigit::Int -> Int
countDigit x
  | x == 0 = 0
  | otherwise  = 1 + countDigit (x `div` 10)
