#include <iostream>
#include <cmath>
using namespace std;

int main() {
	double l, k;
	cin >> l >> k;
	const double c = 1e-5; //вводим константу 
	cout << (int) log (l - c) / log (k);
	return 0;
}