let num_degit n =  1 + int_of_float ( log10 (float_of_int n)) in
let n = read_int () in
let a = ref max_int in
  for i=1 to int_of_float (sqrt (float_of_int n)) do
    if (n mod i) = 0 then 
        a := min !a (max i (n / i))
  done;
  print_int (num_degit !a)
