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