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

END PROGRAM main