a,b=list(map(int,input().split()))



cnt=0

#if a%b==0:

#            cnt=0

while a>=b:

            a=a//b

            cnt+=1

            

print((cnt+1))      







n,m=list(map(int,input().split()))

cnt=0

while n>0:

            n//=m

            cnt+=1

print(cnt)

a, b = list(map(int, input().split()))
cnt = 0
# if a%b==0:
#            cnt=0
while a >= b:
    a = a // b
    cnt += 1
print((cnt + 1))

n, m = list(map(int, input().split()))
cnt = 0
while n > 0:
    n //= m
    cnt += 1
print(cnt)

-a, b = list(map(int, input().split())) +n, m = list(map(int, input().split())) -# if a%b==0: -#            cnt=0 -while a >= b: -    a = a // b +while n > 0: +    n //= m -print((cnt + 1)) +print(cnt)