program main
 implicit none
 integer N, K
 integer Nk
 integer keta
 integer i

 read *,N, K
 
 keta=0
 Nk=N
 do i=1,100000000
  Nk=Nk/K
  keta =keta+1
  if (Nk<K) then
   keta=keta+1
   print '(i0)', keta
   exit
  end if
 end do
 
endprogram main