n,k=map(int,input().split())
result=''
while n>=1:
    b=n%k
    result+=str(b)
    n//=k
print(len(result)) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k result='' result '' while n>=1:
    b=n%k
    result+=str(b)
    n//=k n>=1 n 1 b=n%k b n%k n k result+=str(b) result str(b) str b n//=k n k print(len(result)) print len(result) len result n//=k k n n,k=map(int,input().split()) map(int,input().split()) n result='' '' result result+=str(b) str(b) result b=n%k n%k b k=map(int,input().split()) map(int,input().split()) k
n,k=map(int,input().split())
result=''
while n>=1:
    b=n%k
    result+=str(b)
    n//=k
print(len(result))
