n, k = input().split()



n = int(n)

k = int(k)



count = 0

while True:

    if n == 0:

        break

    else:

        n = n//k

        count += 1



print(count)
N, K = list(map(int, input().split()))

ans = 0



while N != 0:

    N = N//K

    ans += 1



print(ans)
n, k = input().split()
n = int(n)
k = int(k)
count = 0
while True:
    if n == 0:
        break
    else:
        n = n // k
        count += 1
print(count)

N, K = list(map(int, input().split()))
ans = 0
while N != 0:
    N = N // K
    ans += 1
print(ans)

-n, k = input().split() -n = int(n) -k = int(k) -count = 0 -while True: -    if n == 0: -        break -    else: -        n = n // k -        count += 1 -print(count) +N, K = list(map(int, input().split())) +ans = 0 +while N != 0: +    N = N // K +    ans += 1 +print(ans)