#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, s, q;
  scanf("%d%d%d", &t, &s, &q);
  int dwl = s;
  long long int count = 1;
  int start = 0;
  while (dwl < t) {
    start += q;
    dwl += q - 1;
    if (dwl < t) {
      if (start >= dwl) {
        count++;
        start = 0;
      }
    }
  }
  cout << count << endl;
  return 0;
}
