program ABC057C
    implicit none
    integer(8)::N,N_sqrt,i,result1,result2
    integer(8)::digit1=0
    integer(8)::digit2=0
    read(5,*)N
    N_sqrt=int(sqrt(real(N)))
    do i=1,N_sqrt
        if(mod(N,i)==0)then
            result1=i
            result2=N/i
        end if
    end do

    do
        result1=result1/10
        digit1=digit1+1
        if(result1<=0)then
            exit
        end if
    end do

    do
        result2=result2/10
        digit2=digit2+1
        if(result2<=0)then
            exit
        end if
    end do

    print'(i0)',max(digit1,digit2)
end program ABC057C