#include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); long long H, A, temp; int ans = 0; queue slimes; cin >> H >> A; slimes.push(H); for (ans = 0; !slimes.empty(); ++ans) { slimes.front() /= A; if (slimes.front() != 0) slimes.push(slimes.front()), slimes.push(slimes.front()); slimes.pop(); } cout << ans << '\n'; return 0; }