program main
  implicit none
  integer(8) :: n
  integer(4) :: k, i

  read *, n, k
  i = 1
  do
    if ( n/k > 0 ) then
      n = n/k
      i = i + 1
    else
      print *, i
      exit
    end if
  end do

end program main
