from math import log while 1: m,n=map(int,input().split()) print(int(round(log(m)/log(n))))