PROGRAM main
  implicit none
  integer(8) :: N
  integer(8) :: j
  
  read *, N
  
  do j = int(sqrt(dble(N))) +1, 1, -1
    if(mod(N,j) == 0)then
      print "(i0)", max(int(log10(dble(j))), int(log10(dble(N/j))))+1
      exit
    endif
  enddo

END PROGRAM main