n, k = [int(i) for i in input().split()]
cnt = 0
if n == 0:
  print(1)
  exit()
while n != 0:
  n = n // k
  cnt += 1
print(cnt) int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i n, k = [int(i) for i in input().split()] n [int(i) for i in input().split()] k cnt = 0 cnt 0 if n == 0:
  print(1)
  exit() n == 0 n 0 print(1) print 1 exit() exit while n != 0:
  n = n // k
  cnt += 1 n != 0 n 0 n = n // k n n // k n k cnt += 1 cnt 1 print(cnt) print cnt k = [int(i) for i in input().split()] [int(i) for i in input().split()] k n = n // k n // k n n, k = [int(i) for i in input().split()] [int(i) for i in input().split()] n cnt += 1 1 cnt cnt = 0 0 cnt
n, k = [int(i) for i in input().split()]
cnt = 0
if n == 0:
  print(1)
  exit()
while n != 0:
  n = n // k
  cnt += 1
print(cnt)