n,k = map(int,input().split())
for i in range(10**5):
    if n == 1:
        ans = 1
    elif k**(i-1) <= n < k**i:
        continue
    elif k**(i-1) > n:
        ans = i-1
        break
print(ans) n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k for i in range(10**5):
    if n == 1:
        ans = 1
    elif k**(i-1) <= n < k**i:
        continue
    elif k**(i-1) > n:
        ans = i-1
        break i range(10**5) range 10**5 10 5 if n == 1:
        ans = 1
    elif k**(i-1) <= n < k**i:
        continue
    elif k**(i-1) > n:
        ans = i-1
        break n == 1 n 1 ans = 1 ans 1 elif k**(i-1) <= n < k**i:
        continue
     k**(i-1) <= n < k**i k**(i-1) <= n k**(i-1) k i-1 i 1 n k**i k i continue elif k**(i-1) > n:
        ans = i-1
        break k**(i-1) > n k**(i-1) k i-1 i 1 n ans = i-1 ans i-1 i 1 break print(ans) print ans n,k = map(int,input().split()) map(int,input().split()) n ans = i-1 i-1 ans ans = 1 1 ans k = map(int,input().split()) map(int,input().split()) k
n,k = map(int,input().split())
for i in range(10**5):
    if n == 1:
        ans = 1
    elif k**(i-1) <= n < k**i:
        continue
    elif k**(i-1) > n:
        ans = i-1
        break
print(ans)