
n,k = map(int, input().split())
i=0
a=[]

while n!=0:
    a.append(n%k)

    n=n//k
    i=i+1

print(len(a))



 n,k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k i=0 i 0 a=[] a [] while n!=0:
    a.append(n%k)

    n=n//k
    i=i+1 n!=0 n 0 a.append(n%k) a.append a append n%k n k n=n//k n n//k n k i=i+1 i i+1 i 1 print(len(a)) print len(a) len a n,k = map(int, input().split()) map(int, input().split()) n n=n//k n//k n k = map(int, input().split()) map(int, input().split()) k i=i+1 i+1 i i=0 0 i a=[] [] a

n,k = map(int, input().split())
i=0
a=[]

while n!=0:
    a.append(n%k)

    n=n//k
    i=i+1

print(len(a))




