program main
  implicit none
  integer :: n, k, q, m, dig = 0
  read *, n, k

  do
    dig = dig + 1
    q = int(n / k)
    m = mod(n, k) 
    if (q == 0) then
        exit
    else
        n = q
    end if
  end do
  print '(i0)', dig

end program