#include <bits/stdc++.h>
using namespace std;
const int maxn = 1010;
const long long N = 1000000;
const int OO = 0x3f3f3f3;
int n;
long long L[maxn];
const double pi = acos(double(-1));
int s, t, q;
int main() {
  scanf("%d%d%d", &t, &s, &q);
  int ans = 0;
  while (s < t) {
    int x = s * (q - 1);
    s += x;
    ans++;
  }
  printf("%d\n", ans);
  return 0;
}
