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