#include <bits/stdc++.h>
using namespace std;
int main() {
  double t, s, q;
  cin >> t >> s >> q;
  int ans = 1;
  double m1 = s;
  double t1 = m1 * q;
  m1 = m1 + ((q - 1) * t1) / q;
  while (m1 < t) {
    ans++;
    t1 = m1 * q;
    m1 = m1 + ((q - 1) * t1) / q;
  }
  cout << ans << endl;
}
