program ABC156B
    implicit none
    integer(8)::N,K
    integer(8)::digits=1
    read(5,*)N,K
    do
        if(N/K==0)exit
        N=N/K
        digits=digits+1
    end do

    print'(i0)',digits
end program ABC156B