#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int T, s, q;
  int ans = 1;
  cin >> T >> s >> q;
  int x = (q - 1) * s;
  while (s + x < T) {
    ans++;
    s += x;
    x = s * (q - 1);
  }
  cout << ans << "\n";
  return 0;
}
