#include <bits/stdc++.h>
using namespace std;
int gcd(int m, int n) {
  if (!n) return m;
  return gcd(n, m % n);
}
long long binpow(int a, int n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 1)
    return binpow(a, n - 1) * a;
  return binpow(a, n / 2) * binpow(a, n / 2);
}
vector<char> eratosphen(long long n) {
  vector<char> prime(n + 1, true);
  prime[0] = false;
  prime[1] = false;
  for (long long i = 2; i * i <= n; i++)
    if (prime[i])
      if (i * 1ll * i <= n)
        for (long long j = i * i; j <= n; j += i) prime[j] = false;
  return prime;
}
double c(int n, int m) {
  int B[500][500];
  for (int i = 0; i <= n; ++i) {
    B[i][0] = 1;
    B[i][i] = 1;
    for (int j = 1; j < i; ++j) {
      B[i][j] = B[i - 1][j - 1] + B[i - 1][j];
    }
  }
  return B[n][m];
}
bool happy(int a) {
  int x = 0, y = 0;
  for (int i = 0; i < 3; i++) {
    x += a % 10;
    a /= 10;
  }
  for (int i = 0; i < 3; i++) {
    y += a % 10;
    a /= 10;
  }
  return (x == y);
}
int joseph(int n, int k) {
  int res = 0;
  for (int i = 1; i <= n; ++i) res = (res + k) % i;
  return res + 1;
}
void r(int a, int b) {
  if (b > a) r(a, b - 1);
  if (a > b) r(a, b + 1);
  std::cout << b << ' ';
}
bool pal(int n) {
  int a = n;
  int b = 0;
  while (n) {
    b = (b * 10) + (n % 10);
    n /= 10;
  }
  return a == b;
}
int main() {
  int s, t, q;
  cin >> t >> s >> q;
  int c = 0;
  while (t > s) {
    s *= q;
    c++;
  }
  cout << c;
  return 0;
}
