n, k = map(int, input().split())
q, count = n, 0
while(q >= k):
    r = q%k;      q = q//k
    count += 1
print(count+1) n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k q, count = n, 0 q n count 0 while(q >= k):
    r = q%k;      q = q//k
    count += 1 q >= k q k r = q%k r q%k q k q = q//k q q//k q k count += 1 count 1 print(count+1) print count+1 count 1 k = map(int, input().split()) map(int, input().split()) k count += 1 1 count count = n, 0 0 count r = q%k q%k r q = q//k q//k q q, count = n, 0 n q n, k = map(int, input().split()) map(int, input().split()) n
n, k = map(int, input().split())
q, count = n, 0
while(q >= k):
    r = q%k;      q = q//k
    count += 1
print(count+1)