n,k = map(int,input().split())
a = []
if n//k == 0:
  print(1)

else:
  while n//k != 0:
    a.append(n%k)
    n = n//k
  
    if n//k ==0:
      a.append(n%k)
  a.reverse()
  
  print(len(a)) n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k a = [] a [] if n//k == 0:
  print(1)

else:
  while n//k != 0:
    a.append(n%k)
    n = n//k
  
    if n//k ==0:
      a.append(n%k)
  a.reverse()
  
  print(len(a)) n//k == 0 n//k n k 0 print(1) print 1 while n//k != 0:
    a.append(n%k)
    n = n//k
  
    if n//k ==0:
      a.append(n%k)
   n//k != 0 n//k n k 0 a.append(n%k) a.append a append n%k n k n = n//k n n//k n k if n//k ==0:
      a.append(n%k)
   n//k ==0 n//k n k 0 a.append(n%k) a.append a append n%k n k a.reverse() a.reverse a reverse print(len(a)) print len(a) len a k = map(int,input().split()) map(int,input().split()) k a = [] [] a n,k = map(int,input().split()) map(int,input().split()) n n = n//k n//k n
n,k = map(int,input().split())
a = []
if n//k == 0:
  print(1)

else:
  while n//k != 0:
    a.append(n%k)
    n = n//k
  
    if n//k ==0:
      a.append(n%k)
  a.reverse()
  
  print(len(a))