import sys input = sys.stdin.readline N, M = map(int, input().split()) ans = 1 while N**ans<=M: ans += 1 print(ans-1)