#include #include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); long long H, A, temp; int ans = 0; map> slimes; cin >> H >> A; slimes.emplace(H, 1); for (ans = 0; !slimes.empty(); ++ans) { temp = slimes.begin()->first / A; if (temp != 0) slimes[temp] += 2; slimes.erase(slimes.begin()); } cout << ans << '\n'; return 0; }