#include <bits/stdc++.h>
using namespace std;
int t, q, sol = 1, s;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> t >> s >> q;
  int k = 1, k2 = 1;
  while (k <= t) {
    if ((k - s) * q <= (q - 1) * (k2)) {
      k++;
      k2++;
    } else {
      k = 1;
      sol++;
    }
  }
  cout << sol;
  return 0;
}
