from math import log, ceil

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



num = log(N, K)

if int(num) == 0:

    print((1))

else:

    print((ceil(num)))
def base_10_to_n(X, n):

    if (int(X/n)):

        return base_10_to_n(int(X/n), n)+str(X%n)

    return str(X%n)

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

print((len(base_10_to_n(N, K))))

from math import log, ceil

N, K = list(map(int, input().split()))
num = log(N, K)
if int(num) == 0:
    print((1))
else:
    print((ceil(num)))

def base_10_to_n(X, n):
    if int(X / n):
        return base_10_to_n(int(X / n), n) + str(X % n)
    return str(X % n)


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

-from math import log, ceil +def base_10_to_n(X, n): +    if int(X / n): +        return base_10_to_n(int(X / n), n) + str(X % n) +    return str(X % n) + -num = log(N, K) -if int(num) == 0: -    print((1)) -else: -    print((ceil(num))) +print((len(base_10_to_n(N, K))))