n, base = map(int, input().split())
ret = 0
while n:
    n //= base
    ret += 1
print(ret) n, base = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split base ret = 0 ret 0 while n:
    n //= base
    ret += 1 n n //= base n base ret += 1 ret 1 print(ret) print ret n, base = map(int, input().split()) map(int, input().split()) n ret += 1 1 ret n //= base base n ret = 0 0 ret base = map(int, input().split()) map(int, input().split()) base
n, base = map(int, input().split())
ret = 0
while n:
    n //= base
    ret += 1
print(ret)