#include <bits/stdc++.h>
using namespace std;
int main() {
  long S, q, T;
  scanf("%ld %ld %ld", &T, &S, &q);
  long long play = 1;
  for (long q_pr = q; S * q_pr < T; q_pr *= q) {
    play += 1;
  }
  printf("%I64d\n", play);
  return 0;
}
