program abc057
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int64):: n,i

    read*, n
    do i=ceiling(sqrt(dble(n))),1,-1
        if (mod(n,i) == 0) then
            print'(i0)', int(log10(dble(max(i,n/i))))+1
            stop
        end if
    end do
end program abc057