(let [n (read)]
  (->> (range 1 (+ 1(int (Math/sqrt n))))
       (filter #(= (mod n %) 0))
       (map #(max % (quot n %)))
       (map #(int (Math/log10 %)))
       (reduce min)
       (+ 1)
       println 
       ))
