#include <bits/stdc++.h>
using namespace std;
int t, s, q;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> t >> s >> q;
  int ans = 0;
  for (int a = s; a < t; a *= q) {
    ans++;
  }
  cout << ans;
}
