program example
	implicit none
    
    integer :: N,K,kurai=0
    
    read(*,*) N,K
    
    do
    	if(N/K/=0) then
        	kurai=kurai+1
            N=N/K
        else
        	exit
        end if
    write(*,*) kurai
end program