n,k =map(int,input().split())
digitlist = []

while (n/k != 0):
	tmp = n%k
	digitlist.insert(0,(tmp))
	n = n//k

print(len(digitlist)) n,k =map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k digitlist = [] digitlist [] while (n/k != 0):
	tmp = n%k
	digitlist.insert(0,(tmp))
	n = n//k n/k != 0 n/k n k 0 tmp = n%k tmp n%k n k digitlist.insert(0,(tmp)) digitlist.insert digitlist insert 0 tmp n = n//k n n//k n k print(len(digitlist)) print len(digitlist) len digitlist n,k =map(int,input().split()) map(int,input().split()) n k =map(int,input().split()) map(int,input().split()) k digitlist = [] [] digitlist tmp = n%k n%k tmp n = n//k n//k n
n,k =map(int,input().split())
digitlist = []

while (n/k != 0):
	tmp = n%k
	digitlist.insert(0,(tmp))
	n = n//k

print(len(digitlist))