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