#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, s, q;
  cin >> t >> s >> q;
  int loaded = s, counter = 0;
  while (loaded < t) {
    counter++;
    for (int i = 0; i < loaded; i++) {
      if (i % q == 0) {
        loaded += (q - 1);
      }
    }
  }
  cout << counter;
  return 0;
}
