program main
  implicit none
  integer(8) :: N, K
  integer(8):: digit

  read(*,*) N,K
  digit = 0
  do while( N > 0 )
     N = N/K
     digit = digit + 1
  end do
  write(*,'(i0)') digit
  stop
end program main
