#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, s, q;
  cin >> t >> s >> q;
  double g = s;
  int ans = 0;
  double k = (double)(q - 1) / q;
  do {
    g = g / (1 - k);
    ans++;
  } while (g < t && fabs(g - t) > 1e-6);
  printf("%d\n", ans);
  return 0;
}
