#include #include #define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) using namespace atcoder; using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(12); ll n, m; cin >> n >> m; __int128 N = n, M = m; ll ans = 0; auto f = [&](ll x) { __int128 cur = 1; rep(i, 0, x) { cur *= N; if (cur > m) return 0; } return 1; }; while (f(ans + 1)) ans++; cout << ans << endl; }