#include <bits/stdc++.h>
using namespace std;
const long long int MAXN = 9223372036854775806;
const long long int ARR = 3 * 1000 * 100 + 256;
const int MAXM = 2147483647;
double l(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int main() {
  int t, s, q;
  int ans = 0;
  cin >> t >> s >> q;
  while (s < t) {
    s *= q;
    ans++;
  }
  cout << ans;
  return 0;
}
