n, k = map(int, input().split())
res = 0
m = n - 1
a = 1
while True:
    if n <= k ** a - 1:
        break
    a += 1
print(a)

ba97f7084fed4a029801eb3243b54622332ad4d8
<mask token>

<mask token>
while True:
    if n <= k ** a - 1:
        break
    a += 1
print(a)

n, k = map(int, input().split())
res = 0
m = n - 1
a = 1
while True:
    if n <= k ** a - 1:
        break
    a += 1
print(a)
