#include <bits/stdc++.h>
using namespace std;

int main() {
	int n, k; cin >> n >> k;

	int remove = 0, count = 0;
	if( n <= k + 1 ) {
		cout << n << endl;
	} else {
		n -= k + 1;
		remove += k + 1;
		while( 1 ) {
			n -= ceil( static_cast<double>( remove ) / k );
			remove += ceil( static_cast<double>( remove ) / k );
			if( n < 0 ) {
				break;
			}
			count++;
		}

		cout << count + k + 1 << endl;

	}
}

