N,K=map(int,input().split())
X=0
i=0
while X<N:
    X=X+(K-1)*K**i
    i=i+1
print(i) N,K=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K X=0 X 0 i=0 i 0 while X<N:
    X=X+(K-1)*K**i
    i=i+1 X<N X N X=X+(K-1)*K**i X X+(K-1)*K**i X (K-1)*K**i K-1 K 1 K**i K i i=i+1 i i+1 i 1 print(i) print i X=0 0 X i=0 0 i i=i+1 i+1 i K=map(int,input().split()) map(int,input().split()) K N,K=map(int,input().split()) map(int,input().split()) N X=X+(K-1)*K**i X+(K-1)*K**i X
N,K=map(int,input().split())
X=0
i=0
while X<N:
    X=X+(K-1)*K**i
    i=i+1
print(i)