#include <bits/stdc++.h>
using namespace std;
long long t, s, q;
long long ans = 1;
int main() {
  cin >> t >> s >> q;
  while (s < t) {
    long long xia = (long long)s * (q - 1);
    if (s + xia < t)
      ans++, s += xia;
    else
      s += xia;
  }
  cout << ans << endl;
  return 0;
}
