N, K = map(int, input().split())
q, r = divmod(N, K)
ans = 1
while q > 0:
    q, r = divmod(q, K)
    ans += 1
print(ans) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K q, r = divmod(N, K) q divmod(N, K) divmod N K r ans = 1 ans 1 while q > 0:
    q, r = divmod(q, K)
    ans += 1 q > 0 q 0 q, r = divmod(q, K) q divmod(q, K) divmod q K r ans += 1 ans 1 print(ans) print ans K = map(int, input().split()) map(int, input().split()) K N, K = map(int, input().split()) map(int, input().split()) N ans += 1 1 ans r = divmod(q, K) divmod(q, K) r q, r = divmod(N, K) divmod(N, K) q ans = 1 1 ans r = divmod(N, K) divmod(N, K) r q, r = divmod(q, K) divmod(q, K) q
N, K = map(int, input().split())
q, r = divmod(N, K)
ans = 1
while q > 0:
    q, r = divmod(q, K)
    ans += 1
print(ans)
