#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(ll i=0;i> N >> M; ll x=1; for(i=1;;i++){ x*=N; if(x>M){ cout << i-1 << endl; return 0; } } return 0; }