program Main
    use,intrinsic :: iso_fortran_env
    implicit none

    integer(int64) n, sqn, a, b
    
    read *, n
    sqn = nint(sqrt(dble(n))) + 1
    do a=1,sqn
        if (mod(n, a) == 0) then
            b = n/a
        end if
    end do
    
    a = max(b, n/b)
    do b=1,10
        if (a < 10_int64 ** b) then
            print '(i0)', b
            exit
        end if
    end do
end program Main
