import math N,M=map(int,input().split()) n=max(int(math.log(M,N))-1,0) while N**n<=M:n+=1 print(n-1)