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

ans=0

while n!=0:

  n//=k

  ans+=1

print(ans)

import math

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

print((int(math.log(n,k))+1))
n, k = list(map(int, input().split()))
ans = 0
while n != 0:
    n //= k
    ans += 1
print(ans)

import math

n, k = list(map(int, input().split()))
print((int(math.log(n, k)) + 1))

+import math + -ans = 0 -while n != 0: -    n //= k -    ans += 1 -print(ans) +print((int(math.log(n, k)) + 1))