import string

d = string.digits + string.ascii_letters





def con(x, base):

    if x < 0:

        sign = -1

    elif x == 0:

        return d[0]

    else:

        sign = 1

    x *= sign

    digits = []



    while x:

        digits.append(d[int(x % base)])

        x = int(x / base)



    if sign < 0:

        digits.append('-')

    digits.reverse()



    return ''.join(digits)

n,k = list(map(int,input().strip().split()))

v = con(n,k)

print((len(v)))

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

cnt = 1

while(n >= k):

    cnt += 1

    n //= k

print (cnt)
import string

d = string.digits + string.ascii_letters


def con(x, base):
    if x < 0:
        sign = -1
    elif x == 0:
        return d[0]
    else:
        sign = 1
    x *= sign
    digits = []
    while x:
        digits.append(d[int(x % base)])
        x = int(x / base)
    if sign < 0:
        digits.append("-")
    digits.reverse()
    return "".join(digits)


n, k = list(map(int, input().strip().split()))
v = con(n, k)
print((len(v)))

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

-import string - -d = string.digits + string.ascii_letters - - -def con(x, base): -    if x < 0: -        sign = -1 -    elif x == 0: -        return d[0] -    else: -        sign = 1 -    x *= sign -    digits = [] -    while x: -        digits.append(d[int(x % base)]) -        x = int(x / base) -    if sign < 0: -        digits.append("-") -    digits.reverse() -    return "".join(digits) - - -n, k = list(map(int, input().strip().split())) -v = con(n, k) -print((len(v))) +n, k = list(map(int, input().split())) +cnt = 1 +while n >= k: +    cnt += 1 +    n //= k +print(cnt)