#include <bits/stdc++.h>
using namespace std;
int main() {
  float t, s, q;
  cin >> t >> s >> q;
  int count = 1;
  float ps, px0 = s, ls, lx0, d = t;
  t = 0;
  ps = (q - 1) / q;
  t = px0 / (1 - ps);
  while (t < d) {
    px0 = t;
    count++;
    t = px0 / (1 - ps);
    if (fabs(t - d) < 0.00000000001) break;
  }
  cout << count << endl;
  return 0;
}
