#include <bits/stdc++.h>
using namespace std;
const int dx[9] = {0, 1, -1, 0, 0, -1, -1, 1, 1};
const int dy[9] = {0, 0, 0, -1, 1, -1, 1, -1, 1};
const double pi = acos(-1.0);
int t, s, q;
int main() {
  scanf("%d", &t);
  scanf("%d", &s);
  scanf("%d", &q);
  int now = s;
  int bo = 0;
  int ans = 1;
  while (now < t) {
    int tempt = q * s;
    int d = (q - 1) * (tempt / q);
    now += d;
    if (now >= t) break;
    ans++;
    s = now;
  }
  printf("%d\n", ans);
  return 0;
}
