using namespace std;
int main() {
int a, b; cin >> a >> b; int cnt=0; while(b%a==0){ cnt++; b/=a; } cout << cnt; return 0;
}
比赛已结束。