#include <iostream>
using namespace std;

int main() {

    int n, k;
    cin >> n >> k;

    int res = 0;
    int row = 1;
    int w = 0;
    while ( n >= row ) {

	//	cout << w << " " << row << endl;
	
	if ( row*k >= w ) {
	    ++res;
	    w += row;
	    n -= row;
	}
	else if ( n >= row+1 ) ++row;
	else break;
    }
    
    cout << res << endl;
    
    return 0;
}

