#include<iostream>
using namespace std;

int main(){
	int N, K, count = 0, sum = 0, num = 1;
	
	cin>>N>>K;
	
	for(;;){
		if(sum > num*K){
			num = (sum+K-1)/K;
			//cout<<"num = "<<num<<endl;
		}
		N -= num;
		sum += num;
		if(N < 0)break;
		count++;
		//cout<<count<<" "<<sum<<" "<<num<<endl;
	}
	
	cout<<count<<endl;
	
	return 0;
}


