while 1: a,b=map(int,input().split());i=0 while a-b**i:i+=1 print(i)