#include <bits/stdc++.h>
using namespace std;
int main() {
  double t, s, q, r = 0, m, p = 0;
  int o = 1, c = 0;
  cin >> t >> s >> q;
  m = (q - 1) / q;
  while (s < t) {
    s = s * q;
    c++;
  }
  cout << c;
}
