n,k=map(int,input().split())
x,i=0,0
while n>0:
    x+=(n%k)*10**i
    n=n//k
    i+=1
print(len(str(x))) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k x,i=0,0 x 0 i 0 while n>0:
    x+=(n%k)*10**i
    n=n//k
    i+=1 n>0 n 0 x+=(n%k)*10**i x (n%k)*10**i n%k n k 10**i 10 i n=n//k n n//k n k i+=1 i 1 print(len(str(x))) print len(str(x)) len str(x) str x i=0,0 0 i i+=1 1 i x,i=0,0 0 x n=n//k n//k n n,k=map(int,input().split()) map(int,input().split()) n x+=(n%k)*10**i (n%k)*10**i x k=map(int,input().split()) map(int,input().split()) k
n,k=map(int,input().split())
x,i=0,0
while n>0:
    x+=(n%k)*10**i
    n=n//k
    i+=1
print(len(str(x)))