#include <bits/stdc++.h>
inline int Rand() { return (rand() << 16) | rand(); }
using namespace std;
const int N = 200005;
const double eps = 1e-9;
int main() {
  int t, q, s;
  cin >> t >> s >> q;
  int ans = 0;
  while (s < t) {
    s += (q - 1) * s;
    ans++;
  }
  cout << ans;
  return 0;
}
