      PROGRAM piyo
      IMPLICIT NONE
      integer(16) :: n,k,i,buffer
      
      
      read*,n,k
      
      buffer = n
      i = 0
      do while(.true.)
        buffer = buffer / k
        i = i + 1
        
        if( buffer == 0 ) exit
      end do
      
      print*,i
      
      
      
      END PROGRAM