program main
    integer :: n,k
    character(len=20) :: char
    integer :: a,keta
    read *,n,k


!    if(k==10) then
!        print *,n
!        write(char,*) n
!        print *,len_trim(char)
!        print '(i0)',len_trim(char)
!        stop
!    else
        keta=0
        do 
            if(n<k) then
                keta=keta+1
                exit
            else
                a=mod(n,k)
                n=n/k
                keta=keta+1
            endif
        end do
        print '(i0)',keta
!    endif
    stop
end program main